From 76563b34a91e1987e9037ef767c520adf08f3380 Mon Sep 17 00:00:00 2001 From: Lucas-blip-png <177052392+Lucas-blip-png@users.noreply.github.com> Date: Sat, 31 Oct 2026 04:16:55 -0400 Subject: [PATCH] Offer the 32:9 sizes 3840x1080 and 5120x1440 as game resolutions with their HUD layout tools/ultrawide_layout.py computes every edit from the canvas aspect, so 32:9 needs no new layout data: the installer now builds romfs-patches-3840x1080 and -5120x1440 beside the four 21:9 sizes, and the menu lists both. Before, a 32:9 output_res got the wide camera with the 16:9 HUD stretched over it (issue #181). --- README.md | 2 +- docs/architecture.md | 4 ++-- installer/steps.py | 3 ++- runtime/ui/menu.cpp | 8 ++++---- totk.ini.example | 6 +++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 089d3f2b..7274e3bf 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Report problems as issues, following [CONTRIBUTING.md](CONTRIBUTING.md). - Linux and the Steam Deck - Mods made for emulators: unpack a mod into a `mods` folder -- Ultrawide on 1.2.1 (1.4.3 has it for 2560x1080, 3440x1440, 3840x1600 and 5120x2160; other shapes get the wide camera with a 16:9 HUD) +- Ultrawide on 1.2.1 (1.4.3 has it for 2560x1080, 3440x1440, 3840x1600, 5120x2160, 3840x1080 and 5120x1440; other shapes get the wide camera with a 16:9 HUD) - VRR ## Installing diff --git a/docs/architecture.md b/docs/architecture.md index 29967538..ec74fd2f 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -96,8 +96,8 @@ Every guest thread is a host thread. TotK assumes Horizon's scheduler: three app RCAS) on the present. An `output_res` that is not 16:9 (more than 1% off, `res_is_16x9`) also switches on the `aspect` patch set (1.4.3 only), which hands the output's ratio to the camera, and `romfs.c` `overlay_init` loads the `romfs-patches-x` overlay for it when it exists (`tools/make_romfs_patches.py --aspect`, laid out by - `tools/ultrawide_layout.py`; the installer builds four sizes: 2560x1080, 3440x1440, 3840x1600, 5120x2160). Other - shapes, such as 16:10 or 32:9, get the wide camera and the 16:9 HUD stretched over it. 1.2.1 has no camera patch: a + `tools/ultrawide_layout.py`; the installer builds six sizes: 21:9 2560x1080, 3440x1440, 3840x1600, 5120x2160 and + 32:9 3840x1080, 5120x1440). Other shapes, such as 16:10, get the wide camera and the 16:9 HUD stretched over it. 1.2.1 has no camera patch: a wide size there keeps the 16:9 view. The `aspect` setting (`fit`, the default; `stretch`) decides what the present does when the window's shape differs from the output's: `fit` letterboxes, where a 16:9 game in a wider window used to be stretched. diff --git a/installer/steps.py b/installer/steps.py index d72167ec..6cab2d4e 100644 --- a/installer/steps.py +++ b/installer/steps.py @@ -582,7 +582,8 @@ class Compile(Step): TRANSLATED = re.compile(r'gfx_shader: prepare: (\d+) of (\d+) pairs') -WIDE_SIZES = ('2560x1080', '3440x1440', '3840x1600', '5120x2160') # runtime/ui/menu.cpp row_output_res +# 21:9 and 32:9 monitor sizes, as runtime/ui/menu.cpp row_output_res lists them +WIDE_SIZES = ('2560x1080', '3440x1440', '3840x1600', '5120x2160', '3840x1080', '5120x1440') class Prepare(Step): diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 865f6b17..57d62940 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -417,12 +417,12 @@ static void row_window_size(void) { opt_choice_list("TOTK_WINDOW_SIZE", UI_MENU_WINDOW_SIZE, pv, pn, n, UI_MENU_WINDOW_SIZE_DESC); } -// The game resolution (resolution.c): 16:9 sizes from its smallest, 1280x720 (for weak GPUs), up, the common 21:9 -// monitor sizes (the camera and the HUD follow a wider shape, resolution.c res_init), and the current value when it is -// another size. +// The game resolution (resolution.c): 16:9 sizes from its smallest, 1280x720 (for weak GPUs), up, the common 21:9 and +// 32:9 monitor sizes (the camera and the HUD follow a wider shape, resolution.c res_init; the installer lays the HUD out +// for each, installer/steps.py WIDE_SIZES), and the current value when it is another size. static void row_output_res(void) { static const char *const vals[] = {"1280x720", "1600x900", "1920x1080", "2560x1440", "3200x1800", "3840x2160", - "2560x1080", "3440x1440", "3840x1600", "5120x2160"}; + "2560x1080", "3440x1440", "3840x1600", "5120x2160", "3840x1080", "5120x1440"}; enum { N = sizeof vals / sizeof *vals }; char shown[N][32]; const char *names[N]; diff --git a/totk.ini.example b/totk.ini.example index aba2432d..57e50755 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -111,9 +111,9 @@ # Game resolution: the size the game draws its picture and interface in (1280x720 to 7680x4320). Above 1920x1080 the # game's texture heap and memory pool grow with it. A size wider than 16:9, such as 3440x1440 on a 21:9 monitor, widens # the camera's view to that shape and lays the HUD out for it. That is 1.4.3 only (1.2.1 keeps the 16:9 view), and the -# installer prepares the UI layout for four sizes: 2560x1080, 3440x1440, 3840x1600 and 5120x2160. Any other shape -# (16:10, 32:9) 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 (wider than 16:9 only). Read at start. +# installer prepares the UI layout for six sizes: 2560x1080, 3440x1440, 3840x1600, 5120x2160 (21:9) and 3840x1080, +# 5120x1440 (32:9). Any other shape (16:10) 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 (wider than 16:9 only). Read at start. # output_res = 1920x1080 # 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.