Give up on RivaTuner Statistics Server for the run when it hooks the game with the limit for 30 s and never shows it holds it.

The review found that nothing ended an RTSS hold that was never proven: when RTSS listed the game with the limit in
its profile but one sign never came (presents of another API value than Vulkan's, the update flag never cleared, a
period that never moved), the profile kept the limit and the game's pacer held the frames too for the whole run, two
limiters where the pacing rules allow one, with only a reason line in the log and nothing in the menu. Before the
hold had to be proven, RTSS alone held the game once it listed it. rtss_decide.h rtss_decide now counts the polls in a
row where RTSS lists the game, the profile holds a limit of this run (not "none"), a picture went out within 200 ms
and the hold is not shown; at RTSS_UNPROVEN_POLLS (60, 30 s) it puts the profile back and RTSS is out for the run
(RTSS_FAIL_UNPROVEN, "RivaTuner Statistics Server never showed it holds the game"). A minimised window, RTSS not
hooked, a want of no limit, a kept-out want or a poll that shows the hold start the count again. rtss_limit.c logs the
give-up, rtss_limit_state returns 3 for it, so the menu says RivaTuner does not limit the game and the game does, and
rtss_out_of_limit counts it, so a limit set in RTSS itself is reported as a second limiter. The comment above
rtss_decide, rewritten for the rule, is wrapped at 120 columns and no longer cites rtss_fresh, which does not exist.
tests/rtss_limit_check.c checks each sign that never comes (given up at the 60th poll, once, for the run), the polls
that do not count and a shown hold restarting the count; tests/rtss_worker_check.c unproven_run checks it against the
real worker. docs/architecture.md, docs/building.md and nx2navi.ini.example describe the rule and the remaining window
of two limiters before it.

This changes when the game takes the limit back from RTSS, beyond the approved rules: an RTSS whose hold never shows
in its shared memory (a version or setting that differs) is now left out after 30 s and the game's limiter holds
alone, as with rtss = 0, where it held the frames beside the game's limiter before. Not reproduced before the change.
Checks that passed: tests/rtss_limit_check.py (41 of 41), pass_cc_check.py --wall on rtss_limit.c,
tools/check_content.py --staged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 19:46:48 -05:00
parent a7b4f0c7cb
commit 1744681f1a
8 changed files with 164 additions and 35 deletions

View File

@@ -29,8 +29,9 @@
# (rtss-profile.txt next to the game keeps what it held). Changing that profile needs the game run as administrator
# (RTSS keeps its profiles under Program Files). Without it the game limits by itself, as it does with frame generation
# on (RTSS would count the generated frames), while the window is minimised, and for the rest of the run when RTSS's
# own frame counter shows the game past the limit (RTSS then hooks the game without holding it back); the game paces
# movies itself. With low latency on, the driver holds the limit. rtss = 0 always leaves it to the game. With rtss = 0,
# own frame counter shows the game past the limit (RTSS then hooks the game without holding it back) or RTSS is not
# seen holding the game within 30 s; the game paces movies itself. With low latency on, the driver holds the limit.
# rtss = 0 always leaves it to the game. With rtss = 0,
# frame generation or low latency, a limit set in RTSS itself (its global profile or the game's, a frame time limit or
# scanline sync) limits the game a second time: the log and the settings menu say so, and setting it to 0 in RTSS
# leaves one limiter.