mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 13:45:57 +00:00
Offer AMD FSR 4 and AMD FSR 3 as separate choices of the menu's Upscalers row
dlaa_backend gains fsr3, which pins the newest FSR 3 the upscaler DLL offers (3.1.6 with the SDK 2.4 libraries) on any GPU it supports; fsr keeps taking the newest FSR 4, so existing totk.ini files keep their upscaler. The row now reads Off, NVIDIA DLSS, AMD FSR 4, AMD FSR 3 on Windows, with the texts in all four menu languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
94e66ebfde
commit
06ab655e04
11 files changed
+67
-52
No files matched your search
+9
-6
@@ -731,23 +731,26 @@ static const char *present_note(void) {
|
||||
return note;
|
||||
}
|
||||
|
||||
// The upscaler of the 3D scene, one row over two settings: dlaa (off or on) and dlaa_backend (NVIDIA DLSS or AMD FSR).
|
||||
// AMD ships FSR's Vulkan libraries for Windows only, so Linux has DLSS alone (vk_dlaa.c fsr_backend).
|
||||
// The upscaler of the 3D scene, one row over two settings: dlaa (off or on) and dlaa_backend (NVIDIA DLSS, AMD FSR 4 or
|
||||
// AMD FSR 3). AMD ships FSR's Vulkan libraries for Windows only, so Linux has DLSS alone (vk_dlaa.c fsr_backend).
|
||||
static void row_upscalers(void) {
|
||||
static const UiTextId ids[] = {UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR};
|
||||
static const UiTextId ids[] = {UI_MENU_DLAA_OFF, UI_MENU_DLAA_BACKEND_DLSS, UI_MENU_DLAA_BACKEND_FSR,
|
||||
UI_MENU_DLAA_BACKEND_FSR3};
|
||||
static const char *const backends[] = {"", "dlss", "fsr", "fsr3"};
|
||||
#ifdef _WIN32
|
||||
const int n = 3;
|
||||
const int n = 4;
|
||||
#else
|
||||
const int n = 2;
|
||||
#endif
|
||||
int cur = !cfg_bool("TOTK_DLAA") ? 0 : n > 2 && !strcmp(cfg_value("TOTK_DLAA_BACKEND"), "fsr") ? 2 : 1;
|
||||
const char *be = cfg_value("TOTK_DLAA_BACKEND");
|
||||
int cur = !cfg_bool("TOTK_DLAA") ? 0 : n > 3 && !strcmp(be, "fsr3") ? 3 : n > 2 && !strcmp(be, "fsr") ? 2 : 1;
|
||||
int step = opt_choice_step("TOTK_DLAA", UI_MENU_DLAA, menu_text(ids[cur]), cur == 0, UI_MENU_DLAA_DESC);
|
||||
if (!step) return;
|
||||
// A / click: the next value, round to the first; left / right stop at the ends (as opt_choice_list)
|
||||
int nv = step == 2 ? (cur + 1) % n : cur + step < 0 ? 0 : cur + step >= n ? n - 1 : cur + step;
|
||||
if (nv == cur) return;
|
||||
cfg_set("TOTK_DLAA", nv ? "1" : "0");
|
||||
if (nv) cfg_set("TOTK_DLAA_BACKEND", nv == 2 ? "fsr" : "dlss"); // off keeps the upscaler chosen last
|
||||
if (nv) cfg_set("TOTK_DLAA_BACKEND", backends[nv]); // off keeps the upscaler chosen last
|
||||
opt_save_soon();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user