mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 13:09:57 -04:00
Wait for the whole boot prewarm and show its progress on a boot screen.
The game used to start after at most 3 s of prewarm, so after a translator, GPU or driver change it met the rest of its shaders in play and stalled on each one. It now waits for all of it: a warm start is ready in about half a second and shows nothing, while a cold one shows a "Preparing shaders" screen in the menu's colours and the game's fonts, with the shader and then the pipeline count and a bar. The shader and pipeline prewarm report their numbers every 100 ms. The present path takes a frame without a game image for the screen. The RomFS opens on the first host-side read, so the screen's fonts load before the guest's first file access. NX2NAVI_PREWARM_WAIT_MS now defaults to 0 (no cap). With no progress for 60 s the game starts anyway and the prewarm finishes in the background. Measured with an emptied cache: 2,988 shaders translated and 2,399 pipelines built in 9.4 s behind the screen, then 0 ms shader and pipeline waits in Kokiri Forest. Warm: the game starts 0.47 s after launch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1026,8 +1026,10 @@ const char *romfs_entry(uint64_t i, uint64_t *offset, uint64_t *size) {
|
||||
const char *romfs_image_path(void) { return image_file; }
|
||||
// The whole of a RomFS file by its path from the RomFS root, for host-side readers (menu_sound.c: the game's own
|
||||
// interface sounds); malloc'd, NULL when the file is absent or not in the image (an added mod file). The original
|
||||
// file, not a mod's replacement.
|
||||
// file, not a mod's replacement. Opens the RomFS when nothing has yet: the boot screen (ui/menu.cpp menu_boot_frame)
|
||||
// loads the menu's fonts before the guest's first file access.
|
||||
uint8_t *romfs_load(const char *rel, uint64_t *size_out) {
|
||||
fs_init();
|
||||
if (!rel || !image) return NULL;
|
||||
uint64_t i = file_index(rel);
|
||||
if (i >= file_count) return NULL;
|
||||
|
||||
Reference in New Issue
Block a user