Lay the UI out for any screen shape from 4:3 to 32:9, and offer 4:3 and phone sizes (#632, #1453)

A game resolution whose shape the fifteen listed sizes did not cover (13:6 on a phone streamed to, 4:3) drew 16:9 with bars: neither the setup's Shapes step (installer/screens.py shape_size) nor the game's background generator (runtime/romfs.c romfs_folders_prepare) made a layout for it, though tools/ultrawide_layout.py handles any aspect ratio and runtime/romfs.c overlay_init already loads a folder of the exact size. cfg.c cfg_shape_size and screens.py shape_size now give an unlisted shape from 4:3 to 32:9 its own size, so both make romfs-patches-<w>x<h> for it; a display of an unlisted shape still keeps the 1920x1080 default and gets no folder. The list gains 4:3 (1440x1080, 1600x1200, 2048x1536, 2732x2048) and 19.5:9 and 20:9 phone sizes (2340x1080, 3120x1440, 2400x1080, 3200x1440), in the menu's game resolution row too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
itaskaev2andClaude Opus 5.5 committed 2026-11-24 22:50:55 +01:00
1 parent 6205940caf
commit 13b4b0ca9b
8 files changed
+85 -33

No files matched your search

+3 -1
View File
@@ -109,7 +109,9 @@ loads the saves 1.4.3 wrote.
file but the UI archive; for `pc` with the same `--binds` as the PC prompts step, whose key the step follows). The shapes are those of every connected display (Windows: `EnumDisplayDevices`; Linux:
`xrandr`, else the DRM connectors), of the `output_res` the game defaults to on each, and of the `totk.ini`
`output_res` (`installer/screens.py`). One folder per shape, named after the shape's size in `ASPECT_SIZES` (the
closest within 1%; `5120x2160` uses `2560x1080`); `runtime/romfs.c` `overlay_init` maps the game resolution the
closest within 1%; `5120x2160` uses `2560x1080`), or for an unlisted shape from 4:3 to 32:9 its own size (a
`totk.ini` `output_res` of `2560x1200`, say; a display of an unlisted shape gets none, as the game keeps 1920x1080
there); `runtime/romfs.c` `overlay_init` maps the game resolution the
same way, and a folder of the exact size from an older setup still wins. A 16:9 player gets none. The step runs
again when the displays, the prompts or the patches change. At a game resolution whose shape has no folder the
game draws 16:9 with bars and starts the generator itself, in the background, for the next start: at start and