mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 17:29:57 -04:00
rtss_limit_want ran start() on the thread that called it: the registry read of RTSS's folder, a file attribute query under Program Files, the executable's name and the thread's creation. frame_step_cap_ns calls it from nvnQueuePresentTexture, so a guest present paid for them once per run (or at the first present after frame generation or low latency was switched off). rtss_limit_want now only stores the want and, once, spawns the worker; the worker does the lookup and the "found" or "not installed" line before its first poll (find_rtss) and ends when RTSS is not installed. rtss_limit_restore, which may run on another thread, reads the names only once the worker has published them (ready). Pacing does not change: the worker's first poll comes the time of the lookup later. Not reproduced before the change (its cost was never measured). tests/rtss_worker_check.c gains start_off_present, which counts the registry and file calls made on the thread that asked for the limit (3 before the change, 0 after), and not_installed (the worker ends, the game's limiter paces, the exit has nothing to put back). The other scenarios and a compile of rtss_limit.c with -Wall pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 KiB
23 KiB