A create with oldSwapchain retires it even when it fails. The old one, its views and its semaphores now go at once, on
the frame generation paths too, the next present makes a swapchain from nothing, and the failure line is throttled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the replay on the submitting thread (the default), vk_texture_release and entry_of destroy textures on the game's
loader threads, where vk_exec_recording_fence is 0: the deferral took the last submitted value, so the image could go
while another thread's submission, or the recorder behind it, still named it. Such deferrals now wait for issued + 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game's ACES tonemap shader gets a GLSL function linked into its SPIR-V where it clamps each channel: the game's SDR result upgraded to the HDR range by luminance and mapped to the display with the RenoDRT curve, exposure, highlights, shadows, contrast, saturation, highlight saturation, blowout, flare and hue correction. The settings reach it as four vec4 the support buffer gains at 1440. The present encode is a port of the swap chain pass: gamma correction, gamut compression, the peak clamp and PQ. Without an HDR10 swapchain the shader gives the game's own SDR picture; native HDR is unchanged.
The menu offers Off, RenoDX and Native, with gamma correction, the tone mapper and its grading rows. The shader build compiles sources marked "keep functions" without optimisation so their functions survive for the splice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Upscaling row no longer carries "DLSS on or off: after restart". It shows "after restart" only while the upscaler picked cannot start in this run. Frame generation says so only for a change to or from NVIDIA's, since AMD's applies at once, and the HDR row no longer says it twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Large compute shaders that no cache holds are built on one background thread after the boot prebuild, smallest first, so their first dispatch no longer compiles them on the replay thread. NX2NAVI_BIG_BUILD_MAX_MB stops that builder once the process has grown by that much: on a 31 GB machine one of these shaders took the process up by 12.8 GB and the game stuttered while Windows paged. The builder takes the queue under its lock and copies each entry out before compiling it, so a shader queued meanwhile cannot free the arrays under it. The same change reports what pipeline-cache.bin gives back, and starts over when the file grows past NX2NAVI_PIPELINE_CACHE_MAX_MB.
A tensor-core program is now tested before its shader is asked for, in both dispatch paths. It runs the stand-in while NX2NAVI_NATIVE_TENSOR is off, and translating it anyway recorded four AI-upscaler shaders of 0.87 to 4.4 million SPIR-V words that this game never dispatches natively. Process memory went from 29.3 GB to 24 GB and the multi-gigabyte builds during play are gone.
The frame-time summary says which part a slow frame went to, and with NX2NAVI_REPLAY_TIME how the replay splits between draws, binds and transfers; NX2NAVI_SVC_SLOW_MS logs the kernel services that block, with the thread they blocked on. prof_report.py reads the map this build writes and adds the image base to a runtime Rip, so a profile resolves to function names instead of question marks.
build_xlate.py applies the patches with GIT_CEILING_DIRECTORIES set to the build folder's parent. Inside a checkout git read 0021-prmt-byte-permute.patch's paths from the repository's top, skipped every file of it and still exited 0, so PRMT was missing from locally built translators and every byte permute was a no-op. A Skipped patch line now fails the build. The note in AmpereLowering.cs that said the translator emits nothing for PRMT is corrected.
Performance: draws reuse the bindings that did not change and record only the dynamic states that differ from what
the command buffer holds; small uploads come from a staging arena; finished submissions are held briefly and handed to
the queue in batches; the recorder thread can keep a CPU core of its own; ASTC block-linear textures are deswizzled on
the GPU; dynamic resolution steps the upscaler mode to hold a frame-time target. Each has a setting in nx2navi.ini
(bind_reuse, dyn_delta, stg_arena, submit_batch, recorder_core, recorder_prio, astc_gpu_deswizzle, dyn_res) and the
staging cache now frees what it holds at shutdown.
Capture: NX2NAVI_DUMP=key saves the frame after each press of Insert, with mesh draws listed by task, mesh and fragment
shader, depth test and face culling, and mesh_prims.txt giving each mesh draw's primitive, clipping and fragment counts.
All of it is off unless NX2NAVI_DUMP is set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In a test run with the budget taken as 16 GiB, 113 pools refused for the budget asked again 1,795 times in 6,000 frames, every 16 submissions, though nothing could make room: the world's textures were all in use. Now the idle mirrors go only when together they free what the new mirror needs, and a refused pool asks the textures for room and comes back soon once; after that it asks again every 600 submissions until it gets its mirror.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test run with the budget taken as 16 GiB showed two faults. The evictions measured the driver's heap use, which keeps counting a VMA block whole while one allocation lives in it, so freeing textures and mirrors in the middle of blocks did not move it: they went on until 5700 of 7232 textures and 395 of 410 mirrors were gone (9.2 GiB free inside blocks). And mirrors evicted under pressure during a menu were refused again when the world came back, so the draws read the pools over PCIe at 4 fps. The evictions now count the free space inside VMA's blocks as room (vk_mem_vram_live), mirrors are no longer evicted to make room for textures, and a mirror that does not fit after the idle mirrors made room asks idle textures for the rest (vk_texture_want_room) and is asked again 16 submissions later.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pool refresh looks every registered slot up only in submissions that draw through the texture pool. Counted in submissions, a pause screen or a fade that draws nothing through the pool made every texture of the world idle within seconds (the census showed all 3456 decoded textures idle during one such stretch), and under VRAM pressure the eviction would have dropped them all, to be uploaded again when the world came back. The clock now moves only for a submission whose slot checks reached half of the registered pool slots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pool whose mirror did not fit the VRAM budget stayed imported for good, however hot, while mirrors nothing had used for minutes kept their memory. Now a new mirror that does not fit takes the room of mirrors no submission synced for 120 submissions, least recently synced first; a pool refused for the budget asks again after 600 submissions; and above the texture pressure threshold (90% of the budget) mirrors idle for 600 submissions go every 8 submissions so the textures get the room. A victim has nothing in the submission being recorded and its GPU writes are already back in guest memory; its device address table pages move back to the imported buffer (vk_gpa_remap_plain) and the mirror is destroyed once the submission is done. It is mirrored again from a whole copy at its next buffer use. NX2NAVI_MIRROR_EVICT=0 turns it off.
Measured with the budget taken as 16 GiB, same route: off, 691 mirrors (910 MiB) and 133 pools refused for the budget; on, 405 mirrors (799 MiB): 240 idle ones (98 MiB, title-screen and loading pools) evicted, 114 pools refused. That exe still evicted idle mirrors under pressure for the textures, which a later commit removes, and asked refused pools again every 16 submissions (1,795 times), which another commit spaces out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Above the VRAM pressure threshold (NX2NAVI_TEX_VRAM_PRESSURE, 90% of the budget) only released textures went before, so a scene whose live textures alone passed the budget kept growing into system memory. Once the released ones that come back intact are gone, live textures go too, least recently looked up first: only those whose content their storage still holds (CPU-written, never drawn into) and that no lookup reached for 240 submissions and 120 presents. The texture pool refresh looks every registered slot up each submission, so no live descriptor names them; the next use creates and uploads them again. Up to 64 per check, until the use is 2% under the threshold, and the next check waits for the GPU to pass the submissions that may still name the freed images. NX2NAVI_TEX_EVICT=0 turns it off.
Measured with the budget taken as 16 GiB (NX2NAVI_VRAM_BUDGET_MB=16384), same route, the exe at this commit and the next one: with the eviction off, 17,479 MiB in use in the world, of which 12,321 MiB textures, 37 MiB of them idle; with it on, 43 idle live textures (10 MiB) went in about 6,000 frames. In the world nearly every loaded texture is named by a descriptor, so the eviction frees memory mostly once an area or a menu is left. That run predates the later fixes (the idle clock in pool walks, the free space inside blocks); an earlier run without them emptied VRAM, as the commit that stops the evictions from emptying it says.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With it set, the mirror budget check and the texture pressure checks compare with at most that many MiB, so a large card behaves as a small one does when video memory runs low. The heap lines still log what the driver reports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every 600 frames with NX2NAVI_TRACE=perf: the live textures' own memory by kind (decoded ASTC as BC3 or RGBA8, other CPU-written, GPU-written) with the part no lookup reached for 240 submissions and 120 presents, entries sharing a storage address with another, the VkFormats holding the most and the largest entries; then the imported pools the GPU resolved and those it never did, and the VRAM mirrors idle for 120 submissions. Textures now carry the submission and present of their last lookup for it.
Measured with it (user's save, RTX 5090, 2560x1440 with DLSS performance, astc_bc = 1): in the world the live textures held 5,166 MiB (3456 decoded ASTC as BC3, 3438 MiB; 3412 other CPU-written, 965 MiB; 216 GPU-written, 763 MiB; 46 sharing a storage address, 115 MiB) and the mirrors 927 MiB, and of the 5,007 MiB of imported pools the GPU never resolved 4,077 MiB (3787 pools). With fine ASTC footprints kept as RGBA8 (the main checkout's uncommitted rule for astc_bc set by hand), decoded ASTC took 10,382 MiB instead of 3,438.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pad_layout = playstation plays a pad by label as xbox does, named for a PlayStation pad: cross A, circle B, square X,
triangle Y. The prompts follow it like the Xbox layout, by label. Under Automatic the note says PlayStation for a pad
whose bottom button is labelled cross. The layout description in each menu language now says what every choice does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Controls tab has a Button prompts row again, with Nintendo, Xbox and PlayStation. prompts = playstation is a new
value next to xbox; nintendo, xbox and pc read as before, and pc stays out of the row as nothing makes its files for
this game. The game reads its prompts at start, so the row says when a restart would change them.
tools/pad_prompts.py writes the overlay folders romfs-patches-xbox, -xbox-label, -playstation and -playstation-label
from the player's RomFS and a folder of button art that stays outside the repository. The button font's glyphs become
outlines traced from the art, the action prompt's letters and the ocarina's note buttons are painted again in their
own BC4 and ASTC formats, and the font's entry in the resource size table grows with it. The by-position folders show
Switch A as B or circle, the by-label ones as A or cross, following the pad layout. The settings probe checks the new
value and folder names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--probe-astc now runs cut-out mip chains through the BC3 encoder at all 14 footprints, linear and sRGB, plus two
chains large enough to take several scratch chunks: transparent and opaque patches of void-extent blocks, whose edges
cut through BC3's 4x4 blocks where the footprint's side is 5, 6 or 10, mixed with ASTC blocks whose alpha jumps from
transparent to opaque between neighbouring texels, down to 1x1. Alpha 0 and 255 must come out exact and every alpha
test at 1/4, 1/2 and 3/4 must keep its side outside the block's alpha step. The encoder passes on an RTX 5090, before
and after this change (418540 BC3 blocks across a transparent-to-opaque edge); an encoder that lets an opaque 255 drop
to 254 in an edge block passes the old bounds and fails the new check.
The encoder reads texel bytes as integers instead of through unpackUnorm4x8, so its alpha endpoints are the block's
exact least and greatest alpha on any GPU.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The event order (vk_exec.c) holds a submission at a wait whose signal has not been replayed. In Kokiri Forest dialogue several presents a second came with the frame's whole submission held (4 held submissions, nothing drawn since the last present): the present showed the picture from before, a flash of the whole picture, and the frame was drawn afterwards in the present thread's empty submission, next to the following frame. With the event order off (NX2NAVI_EVENT_ORDER=0) the same spot had no such frame in 3600.
present_held (vk_backend.c, synchronous replay only): at a present with held work, what can go on runs first in a submission of its own; if work is still held, the present waits and goes out after the submission that replays the last of it, at the next present, or after 8 submissions. present_held = 0 (NX2NAVI_PRESENT_HELD=0) turns it off.
held_sync (vk_exec.c vk_exec_record): a submission without commands of its own that resumes held work now gets the VRAM mirror sync before and the write-back after, and a uniform copy, like any submission. Before, that work read mirrors that had missed the CPU's latest writes, and its GPU writes were dropped from the write-back list by the next submission's vk_mem_mirror_begin. held_sync = 0 (NX2NAVI_HELD_SYNC=0) turns it off.
Not yet measured in play.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Kokiri Forest dialogue (Saria, dlss = performance) about 1 frame in 20 had no camera, and DLSS started a new history twice for each: 24 to 26 camera resets per 300 frames. The camera block was looked up in the uniform copy of the submission DLSS ran in, which on those frames had none: the frame's work had been held past its present by the event order and ran in the present thread's empty submission. vk_dlaa_draw now keeps the camera rows as the first scene draw read them (vk_usnap_read), and mv_pass uses those. A frame with no scene-context draw at all keeps DLSS's history with zero motion, for up to 6 frames in a row.
Measured at the Saria spot: camera resets went from 24 to 26 per 300 frames to none in 3600 frames (the first frame only). The whole-picture flashes stayed: they come from the presents that go out with that work held, handled separately.
The log now explains frames without a camera, frames without the DLAA point (with the held submissions at that present), light target changes and a second scene after DLSS ran, plus a line every 300 DLSS frames with resets. dlaa_cam_keep = 0 (NX2NAVI_DLAA_CAM_KEEP=0) restores the old camera handling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Guest code runs ballots and shuffles where the guest compiler had the warp reconverged, for example right after a loop
each lane leaves at a different iteration. Vulkan only promises that with VK_KHR_shader_maximal_reconvergence, so
the pipeline code adds the extension and the MaximallyReconvergesKHR mode to every module that declares subgroup
capabilities. vk_reconverge = 0 in nx2navi.ini turns it off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The step sat at 0 % until it was done, an hour on some PCs, because nothing it ran reported progress to the launcher. nx2navi.exe --prepare-shaders now prints how many shaders it has translated and how many it has built into the driver's cache every 2 s. make_game.py reads them as they come and fills the bar, the translation the first half and the build the second, with the counts in the step's text. An event every 10 s keeps the text current while nothing is printed, and after 3 minutes without a count moving it says so, and that the step is still running.
The selftest draws the step as a tenth screen. Its made-up update was version 0.3.11, so from 0.4.0 on the update-ready screen showed Up to Date and was no longer drawn; it is now a minor version past the launcher running it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BSHQpLnScF9sNv4LNAaaS3
The foliage's sun shadows took most of the GPU time: one mesh draw shaded about 1,000 million fragments in the far cascade. The far cascade now shades them at a 2x2 rate, and the two far cascades drop one side of the double-sided cards. At the forest entrance the frame rate went from 18 to about 43 fps on an RX 7900 XT.
FSR 3.1, its frame generation and the console mode now take effect without a restart. The full performance overlay lists the settings shown in the options menu.
NX2NAVI_GPU_PASSES times each pass and counts its fragments, and NX2NAVI_SET_AT changes settings at a given frame for test runs. Both are off by default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It was offered only while already set, because Streamline presented no generated frames yet. With Reflex now pacing it from the frame's start it generates frames, and the user played with it: it works well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NX2NAVI_TRACE=audio logs voices starting, stopping and sharing a wave buffer; NX2NAVI_DUMP_MOVIE dumps movie frames; NX2NAVI_LOG_CS_BINDS says why the stand-in for an untranslated compute program skipped a dispatch; and NX2NAVI_TRACE=perf adds heap and commit census lines on their own thread, with VMA maps when write-combined memory grows by 2 GiB. From a tester's fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reflex's markers sat at the host present with frame numbers unlike the frame's tags, slReflexSleep was never called, and the low-latency mode was set before any swapchain existed, so it never applied. GfxBackend.frame_start, called from nvnWindowAcquireTexture, now sets the simulation and submit-start markers after Reflex's sleep (skipped once nothing was presented for 200 ms); submit end is set when the frame's submissions went out; the mode is set again after each swapchain (NX2NAVI_REFLEX: 1 on, 0 off, 2 boost); frames are numbered by the game's presents; and the fps counter counts what was shown. NX2SL_VERSION is 3, so nx2navi_dlssg.dll must be rebuilt. From a tester's fixes: 42-45 fps game, 84-90 on screen (was 24).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mirror prologue is closed after the part it was made for but runs first on the GPU; its timestamps were read in the wrong order, so its copies counted as idle time with work queued. ts_submitted now queues the reads in GPU order, and the perf line shows the copies on their own. From a tester's fixes: in Kokiri Forest at 4K on PCIe 3.0, 7.1 of 20.4 ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With hdr = native the game's output pass writes a 10-bit PQ target (A2B10G10R10), not the 8-bit sRGB one vk_dlaa_pass looked for, so DLAA never ran and frame generation had no depth or motion vectors for most frames. The native HDR picture's format is now named once (vk_hdr_native_picture) and taken by both DLAA and the HDR present. From a tester's fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game's event script times the intro movie's narration and fades by counting updates as 60 Hz frames. At 144 fps everything ran 2.4 times early: each line started over the one before, and the closing fade hid the dream. frame_step_cap_ns caps the rate at the movie's 60 fps from the decoder's start to its end of stream (ov_movie_live); with fps_limit = unlimited the cap is the movie's rate. With RTSS limiting, the game's own limiter holds a new rate until RTSS has applied it. NX2NAVI_MOVIE_FPS sets the cap, 0 turns it off. From a tester's fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After an hour at 2160p the 2048 released entries held 5-7 GiB of render targets and decoded textures, charged to Windows' commit as well. NX2NAVI_TEX_RELEASED_MB caps them by size (default 1/16 of RAM, 1-4 GiB), and with less commit free than NX2NAVI_TEX_COMMIT_FREE_MB they are dropped to 256 MiB. Only entries released 120 frames ago or more go, at most 32 a check, oldest first. On Linux the commit check applies only with vm.overcommit_memory = 2 (plat_commit_enforced). From a tester's fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four play-recorded compute shaders of 0.87 to 4.4 million SPIR-V words (the game's tensor-core upscaler passes, which run through the stand-in here) are recorded and so prebuilt at boot. The driver spent minutes and gigabytes on each, four at once, none finished, and every start began again until RAM ran out and the screen went black. The boot prebuild now creates a compute shader over 512K words only from a pipeline cache (VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT) and leaves it to its first dispatch otherwise. NX2NAVI_LIB_PREBUILD_BIG=<words> sets the limit, 0 the old behaviour. From a tester's fixes: memory flat at 13 GB on the title screen, prebuild done in 463 ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing kept a second copy of the game off the same profile (a double start, or the restart going ahead after 30 s
while the old process still ran). Its start took the first copy's commit in progress for an interrupted one and
deleted it, removed the first copy's working copy under its open files, and then both wrote into one save-tx/work,
so saves were lost or mixed. The save storage now takes <profile>/instance.lock (plat_lock_file: a file no other
process can open on Windows, flock on Linux) and a second copy stops with "another copy of the game is running".
--probe-fs gives the lock back before deleting its temporary profile and passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nvnTextureInitialize copied the layout's size of packaged data to the pool's memory at the texture's offset without
checking either against the pool: a descriptor larger than its pool wrote past the pool's storage. It now stops
with the sizes instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The present resets its slot's fence after the acquire. When the submit then failed (out of device or host
memory), the fence stayed unsignalled and the acquire's semaphore signalled: the slot's next fence wait timed out
after 5 s, the frame counter no longer moved on, and every later present waited on the same slot, so the picture
stopped for good while each game submit waited behind it. An empty batch now takes the semaphore and signals the
fence, and the swapchain is made again, which gives the acquired image back.
- A crop from the game's nvnWindowSetCrop that starts past the image gave a blit with an inverted source rectangle;
the whole image is shown then.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An empty NX2NAVI_SPIN or NX2NAVI_VRAM_HEADROOM in the environment stopped the game: both read the key with
cfg_bool, and an empty value falls back to the settings table, where these keys have no row. Empty now means unset.
- find_ini checked for 10 bytes after the exe folder's separator where "nx2navi.ini" and its NUL take 12, so an exe
path just under 1024 bytes wrote two bytes past the buffer.
- The performance overlay read the clock before taking the lock, so a frame pushed in between was newer than "now",
the unsigned age wrapped and the overlay showed 0 fps for that refresh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every settings change (a slider step, F10, a cheat) closed the connection and made a new one, so the status
disappeared and came back each time, and a held slider reconnected twice a second, enough to hit Discord's rate
limit. A new app id reconnects; a new image is resent on the same connection; anything else changes nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- At shutdown, restart or logoff Windows ends the process after WM_ENDSESSION without a WM_CLOSE, so the close path
never ran: a settings change from the menu still waiting to be saved was lost, RivaTuner's profile kept the
game's limit and a save Commit in flight was cut off. WM_ENDSESSION now runs the close path.
- The window opened at its setting (by default 1920x1080) whatever the screen, so on a 1080p laptop its bottom, the
HUD with it, was under the taskbar. At start it is scaled down, in its own proportions, to fit the work area; the
setting is left as it is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A measured rate under the lowest limit (a 24, 25 or 29.97 Hz TV) was taken for an unknown one and paced at 60: twice
the screen's rate, so half the frames were thrown away. Only an unknown rate (no window yet) is 60 now; a real one
below 30 Hz is held at 30.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetInfo's program id and the application id IsSaveDataExisting and MountSaveDataReadOnly answer for were another
game's. The game asking about its own save data by its own id was told there was none; asking with the other id
mounted its own save. Both are now this game's id, and --probe-fs passes with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A profile, save or account folder that is a junction or symbolic link (a profile moved to another drive and linked
back) stopped the start at "cannot create directory"; it is now taken as the folder. A save folder linked to
another drive than save-tx cannot take commits (a folder rename cannot cross drives); the log now says so instead
of blaming a file in use.
- A missing account.uid made a new account, and the save under the old account's folder was no longer found (a
profile copied without the file, or only its save folder put in place). When save/ holds exactly one account
folder, its account is taken. A file that is there but cannot be read now stops the start instead of being
replaced.
- WriteFile's check of offset plus size against the file size could wrap for a size near 2^64.
- The first save mount deletes the last session's working copy with the retries the start uses, so a scanner
holding a file there no longer stops the game.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The probe waited for each Commit's background thread with fs_save_flush, which since Quit keeps saves safe also marks
the process as exiting: every later Commit was refused ("the game is closing") and 20 of the 160 checks failed. It
now waits with save_wait_commit; all checks pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing reads SDL's events there (the window is our own), yet every axis and button change of a gamepad was queued
until SDL's cap of about 65,000 events, several MB, after which each further event failed and set SDL's error text,
which later log lines report. The gamepad state the input code reads does not come from the queue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetAsyncKeyState reads the physical buttons, so with "switch primary and secondary buttons" on, a left-handed
player's primary button targeted and the secondary attacked, the other way round from the window's own clicks.
mouse_l and mouse_r now mean the primary and secondary buttons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lstick_deadzone = 8% (or any typo) counted as set, and since that row has no default of its own it read as 0: no
dead zone at all, so a drifting stick moved Link. The documented fallback, stick_deadzone, is now used then.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
menu_sound_play restarts a voice in place for a repeated cursor tick. When that happened between the mixer's loads
of the voice's position and its sound, the old position was used with the new, shorter sound: the frame count
wrapped and the mixer read past the sound's samples. The mixer now checks that the position is still the voice's
and inside the sound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An audio_prefill_ms of 180 or more asked for more queued audio than the renderer ever fills the ring to (half of
it), so the output never started and stayed silent. The prefill is now held to that target; nx2navi.ini.example
says so.
- An infinite or huge pitch or sample rate from the game kept the per-sample loops going for good under the
renderer's lock, which then blocked the game's RequestUpdate. The step is held to 64 source samples per output
sample.
- An endless loop buffer with no samples (start equal to end), which the voice keeps as the DSP does, made
advance_voice go round for good; it now starves the voice as intended.
- A NaN sample or effect state reached the device, where it plays as full scale; it now plays as silence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A folder in a mod's RomFS that could not be listed (no permission, or a path longer than 260 characters, as a mod
deep in a long game folder makes) lost its files without a word in the log; the walk now names it. The manifest
asks for long path support, so where Windows has it switched on (LongPathsEnabled) those files are served.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cfg_load trims blanks around a value and takes one pair of quotes off it, so a mods_order list whose first mod's
folder name starts with a space, or a value that is itself quoted, came back different at the next start and the mod
lost its place and switch. Such values are now written in quotes; others are written as before. --probe-cfg checks it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>