Hold the game at 60 fps while a movie plays, so the intro's narration no longer doubles and the dream shows at high refresh rates.

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>
This commit is contained in:
chrg6
2026-11-08 15:33:48 -05:00
parent 29d8451dd2
commit 95ab18fba2
5 changed files with 51 additions and 8 deletions

View File

@@ -265,8 +265,8 @@ static void worker(void *arg) {
over = 0;
if (r < 0) atomic_store(&failed, FAIL_READONLY), set_active(0, fail_reason(FAIL_READONLY));
else if (r == 0) set_active(0, "RivaTuner Statistics Server refused this limit");
else set_active(hooked, "RivaTuner Statistics Server has not hooked the game yet");
} else {
else if (atomic_load(&want) == w) set_active(hooked, "RivaTuner Statistics Server has not hooked the game yet");
} else if (atomic_load(&want) == w) { // a newer limit waits for the next poll (rtss_limit_want)
set_active(hooked, "RivaTuner Statistics Server has not hooked the game yet");
// RTSS's own count of the game's frames while the game's limiter stands aside: well above the limit for
// three seconds means RTSS does not hold the game to it, and the game takes the limiting back for the run
@@ -311,7 +311,9 @@ static void start(void) {
void rtss_limit_want(int64_t mhz) {
if (!started && mhz < 0) return; // kept out from the start, for the whole run (both reasons need a restart)
if (!started) start();
atomic_store(&want, mhz);
// a new limit: the game's own limiter holds it until the worker had RTSS apply it, up to POLL_MS later (a movie's
// cap that waited for that ran the movie's 60 Hz count fast for half a second)
if (atomic_exchange(&want, mhz) != mhz) atomic_store(&active, 0);
}
int rtss_limit_active(void) { return atomic_load_explicit(&active, memory_order_relaxed); }