mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 13:05:57 +00:00
Make the PC prompts for every game resolution the setup lays the UI out for
The setup wrote romfs-patches-pc for 16:9 only, so prompts = pc on a 21:9, 32:9, 16:10 or 3:2 screen kept the game resolution at 1920x1080 (cfg.c) or, with output_res set to the screen's shape, fell back to the Switch prompts. - make_romfs_patches.py --reuse <folder>: a file of an earlier overlay whose contents match is hard-linked (copied where links fail) instead of compressed again; the output is byte for byte the same. - The setup builds romfs-patches-pc-<w>x<h> for each of ASPECT_SIZES from romfs-patches-pc with --reuse: only the Common archive is compressed, so the fifteen folders take about two minutes and 6 MiB each instead of 22 minutes and 73 MiB each. - cfg.c: the display-shaped output_res default applies with prompts = pc when romfs-patches-pc-<w>x<h> is there (romfs_shaped_pc_ready); Xbox prompts keep 1920x1080 as before.
This commit is contained in:
1 parent
ae30a61b7b
commit
ceece5683a
10 files changed
+125
-26
No files matched your search
+12
-5
@@ -1080,19 +1080,26 @@ static void index_path(char *out, size_t cap) {
|
||||
strcpy(out + k, "romfs-index.bin");
|
||||
}
|
||||
|
||||
// 1 when the game resolution w x h has the UI layout of its shape: romfs-patches-<w>x<h> next to romfs-index.bin with a
|
||||
// manifest, the folder overlay_init looks for. Works before fs_init: index_dir is not set that early (res_init and
|
||||
// resolution.c decide run first), so the index path is worked out again here.
|
||||
int romfs_shaped_ready(unsigned w, unsigned h) {
|
||||
// 1 when <prefix>-<w>x<h> has a manifest next to romfs-index.bin. Works before fs_init: index_dir is not set that early
|
||||
// (cfg_init, res_init and resolution.c decide run first), so the index path is worked out again here.
|
||||
static int shaped_folder_ready(const char *prefix, unsigned w, unsigned h) {
|
||||
char dir[2100], path[2200];
|
||||
index_path(dir, sizeof dir);
|
||||
char *sep = plat_last_sep(dir);
|
||||
if (sep) *sep = 0;
|
||||
else strcpy(dir, ".");
|
||||
return snprintf(path, sizeof path, "%s/romfs-patches-%ux%u/manifest.tsv", dir, w, h) < (int)sizeof path &&
|
||||
return snprintf(path, sizeof path, "%s/%s-%ux%u/manifest.tsv", dir, prefix, w, h) < (int)sizeof path &&
|
||||
plat_file_exists(path);
|
||||
}
|
||||
|
||||
// 1 when the game resolution w x h has the UI layout of its shape: romfs-patches-<w>x<h>, the folder overlay_init
|
||||
// looks for.
|
||||
int romfs_shaped_ready(unsigned w, unsigned h) { return shaped_folder_ready("romfs-patches", w, h); }
|
||||
|
||||
// 1 when it has the PC prompts with that layout too: romfs-patches-pc-<w>x<h>, which overlay_init loads in its place
|
||||
// with prompts = pc.
|
||||
int romfs_shaped_pc_ready(unsigned w, unsigned h) { return shaped_folder_ready("romfs-patches-pc", w, h); }
|
||||
|
||||
static void load_index(void) {
|
||||
char path[2100];
|
||||
index_path(path, sizeof path);
|
||||
|
||||
Reference in new issue
Block a user