mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-18 20:15:56 +00:00
Merge task/fsrlabel: the overlay says when FSR is selected but the picture is shrunk (#219)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
57db3f8fe0
3 files changed
+9
-2
No files matched your search
+5
-1
@@ -1061,7 +1061,11 @@ static void perf_picture(const MenuTarget *t, const ImVec4 &c) {
|
||||
int s = cfg_int("TOTK_SHARPNESS");
|
||||
snprintf(v[3], sizeof v[3], menu_text(UI_MENU_OV_FMT_FSR), s < 0 ? 0 : s > 100 ? 100 : s);
|
||||
} else {
|
||||
snprintf(v[3], sizeof v[3], "%s", menu_text(t->scaler ? UI_MENU_OV_SCALE_BILINEAR : UI_MENU_OV_SCALE_NONE));
|
||||
// FSR enlarges only (vk_fsr_record): an image larger than the window is shrunk by the blit even with FSR selected
|
||||
int down = t->scaler == 1 && !strcmp(cfg_value("TOTK_UPSCALER"), "fsr") &&
|
||||
(t->image_w > (int)t->width || t->image_h > (int)t->height);
|
||||
snprintf(v[3], sizeof v[3], "%s",
|
||||
menu_text(down ? UI_MENU_OV_SCALE_DOWN : t->scaler ? UI_MENU_OV_SCALE_BILINEAR : UI_MENU_OV_SCALE_NONE));
|
||||
}
|
||||
double hz = frame_step_limit_hz();
|
||||
snprintf(v[4], sizeof v[4], "%s", menu_text(UI_MENU_OV_NONE));
|
||||
|
||||
@@ -279,6 +279,7 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_OV_FMT_SIZE] = "%ux%u", [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%",
|
||||
[UI_MENU_OV_FMT_FSR] = "AMD FSR 1, sharpness %d%%", [UI_MENU_OV_SCALE_NONE] = "none (1:1)",
|
||||
[UI_MENU_OV_SCALE_BILINEAR] = "bilinear",
|
||||
[UI_MENU_OV_SCALE_DOWN] = "bilinear (FSR only enlarges)",
|
||||
};
|
||||
|
||||
static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
@@ -546,6 +547,7 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_OV_FMT_SIZE] = "%ux%u", [UI_MENU_OV_FMT_SCENE] = "%ux%u, %.0f%%",
|
||||
[UI_MENU_OV_FMT_FSR] = "AMD FSR 1, резкость %d%%", [UI_MENU_OV_SCALE_NONE] = "нет (1:1)",
|
||||
[UI_MENU_OV_SCALE_BILINEAR] = "билинейное",
|
||||
[UI_MENU_OV_SCALE_DOWN] = "билинейное (FSR только увеличивает)",
|
||||
};
|
||||
|
||||
#define SWKBD_ONLY(name, ...) static const char *const name[UI_TEXT_COUNT] = {SWKBD(__VA_ARGS__)}
|
||||
|
||||
+2
-1
@@ -165,7 +165,8 @@ typedef enum {
|
||||
UI_MENU_OV_FMT_SCENE, // "%ux%u, %.0f%%": the scene and its share of the game image's width
|
||||
UI_MENU_OV_FMT_FSR, // "AMD FSR 1, sharpness %d%%"
|
||||
UI_MENU_OV_SCALE_NONE, UI_MENU_OV_SCALE_BILINEAR,
|
||||
UI_MENU_LAST_ID = UI_MENU_OV_SCALE_BILINEAR,
|
||||
UI_MENU_OV_SCALE_DOWN, // FSR is selected but the image is larger than the window: FSR only enlarges
|
||||
UI_MENU_LAST_ID = UI_MENU_OV_SCALE_DOWN,
|
||||
UI_TEXT_COUNT
|
||||
} UiTextId;
|
||||
|
||||
|
||||
Reference in new issue
Block a user