Offer a 1080p game resolution.

The picture's height can now be 1080, below the game's own 1440, for slower GPUs: the scene, the DLSS and FSR 3.1
modes and frame generation follow it, and the ultrawide shapes become 2560x1080 and 3840x1080. "Native" keeps its
floor of 1440. The example settings file now documents game_aspect and game_res.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-08 07:59:44 -05:00
parent 22bbe674be
commit a8f34e48c8
4 changed files with 18 additions and 9 deletions

View File

@@ -156,6 +156,12 @@
# gets the camera's view but a 16:9 HUD, stretched over the picture, unless you build its layout with
# tools/make_romfs_patches.py --aspect WxH. Read at start.
# output_res = 1920x1080
# Ocarina of Time sizes its picture with these two instead (output_res and render_scale do nothing there). The shape:
# 16:9, window (the window's shape, or the monitor's in fullscreen), 21:9 or 32:9. The height: 1080 (lighter than the
# game's own), 1440 (the game's own), 1800, 2160, 2880 or window (the window's height, at least 1440). The DLSS and
# FSR 3.1 modes render their share of this picture. Read at start.
# game_aspect = 16:9
# game_res = 1440
# 3D render scale: the scene's size relative to the game resolution, game (5/6, the game's own 1600x900 at 1080p) or
# a percentage (25 to 400, at most 4096 pixels a side); above 100 supersamples the scene (anti-aliasing). Read at start.
# render_scale = game

View File

@@ -123,7 +123,7 @@ static const CfgMeta metas[] = {
{"FRAMEGEN", "off", "off|fsr3|dlss", RESTART}, // vk_fg.cpp, vk_dlssg.c
{"DLSS_CHAR_MASK", "65", "0|35|65|100", LIVE}, {"FXAA", "1", "0|1", LIVE},
{"GAME_ASPECT", "16:9", "16:9|window|21:9|32:9", RESTART}, // widescreen.c
{"GAME_RES", "1440", "1440|1800|2160|2880|window", RESTART}, // widescreen.c: the picture's height
{"GAME_RES", "1440", "1080|1440|1800|2160|2880|window", RESTART}, // widescreen.c: the picture's height
{"ASPECT", "fit", "fit|stretch", LIVE}, {"FOV", "100", "70..140", LIVE},
{"ANISO", "game", "game|2|4|8|16", RESTART}, // vk_texture.c sampler_features
// colour adjustment (vk_color.c); the preset is the menu's, the four values are what the present uses

View File

@@ -876,11 +876,11 @@ static void row_framegen(void) {
if (nv >= 0 && nv < n) opt_apply("NX2NAVI_FRAMEGEN", values[nv]);
}
// The picture's height (widescreen.c picture_height): the game's 1440 or more.
// The picture's height (widescreen.c picture_height): 1080, the game's 1440 or more.
static void row_game_res(void) {
static const char *const values[] = {"1440", "1800", "2160", "2880", "window"};
const char *names[] = {"1440p", "1800p", "2160p (4K)", "2880p (5K)", menu_text(UI_MENU_GAME_RES_NATIVE)};
opt_choice_list("NX2NAVI_GAME_RES", UI_MENU_GAME_RES, values, names, 5, UI_MENU_GAME_RES_DESC);
static const char *const values[] = {"1080", "1440", "1800", "2160", "2880", "window"};
const char *names[] = {"1080p", "1440p", "1800p", "2160p (4K)", "2880p (5K)", menu_text(UI_MENU_GAME_RES_NATIVE)};
opt_choice_list("NX2NAVI_GAME_RES", UI_MENU_GAME_RES, values, names, 6, UI_MENU_GAME_RES_DESC);
}
static void tab_screen(float scale) {

View File

@@ -55,17 +55,20 @@ static double wanted_ratio(void) {
return (double)w / h;
}
// NX2NAVI_GAME_RES: the picture's height, from the game's 1440 up to 4320 ("window": the window's height, or the
// monitor's in fullscreen).
// NX2NAVI_GAME_RES: the picture's height, 1080 up to 4320 ("window": the window's height, or the monitor's in
// fullscreen, never below the game's 1440). 1080 is the one height below the game's own: a lighter picture for slower
// GPUs, its scene and the DLSS modes scaled down with it (wide_present, scale_k).
#define PICTURE_MIN_H 1080
static unsigned picture_height(void) {
const char *s = cfg_value("NX2NAVI_GAME_RES");
int w = 0, h = GAME_H;
int w = 0, h = GAME_H, min = PICTURE_MIN_H;
if (!strcmp(s, "window")) {
if (!screen_size(&w, &h)) h = GAME_H;
min = GAME_H;
} else {
h = atoi(s);
}
return h < GAME_H ? GAME_H : h > 4320 ? 4320 : (unsigned)h;
return h < min ? (unsigned)min : h > 4320 ? 4320 : (unsigned)h;
}