mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 04:19:57 -04:00
Hand the frame limit to RivaTuner Statistics Server where it runs, and take it back when RTSS does not hold to it.
Where RTSS is installed and running, the frame limit from the menu goes into RTSS's profile for the game's executable through RTSS's hooks library, loaded at run time, and the game's own pacer stands aside while RTSS has hooked the game. Menu changes apply live, unlimited clears the limit, and closing the game (or any exit path) puts back what the profile held, or removes a profile the game created. Each change is read back from the saved profile: without administrator rights RTSS's profile folder cannot be written, and the game then keeps its own limiter. While RTSS limits, RTSS's own frame counter for the game is checked against the limit; well past it for three seconds, the game takes the limiting back for the run. The log says which limiter is in use and why, and a note under the frame-rate row says when RTSS limits, when its profile is read-only, and when it does not hold the game to the limit. rtss = 0 and frame generation keep RTSS out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,7 @@ void gfx_window_closed(void) {
|
||||
cfg_save(); // a menu change saves 400 ms later on the render thread (option_rows.cpp); closing sooner kept the old file
|
||||
vk_pipeline_save();
|
||||
prof_write(); // plat_exit runs no atexit handlers
|
||||
rtss_limit_restore(); // RivaTuner Statistics Server's profile as it was
|
||||
fs_save_flush(); // last: the game's threads still run until plat_exit, and a Commit after this one is refused
|
||||
if (restart) {
|
||||
plat_setenv("NX2NAVI_REEXEC", NULL); // the new process counts its own address-space retries (memory.c)
|
||||
|
||||
Reference in New Issue
Block a user