mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 07:59:58 -04:00
Tell of two limiters also where RivaTuner Statistics Server is out of the limit because its profile is read-only or its library did not load.
The review found that docs/architecture.md's list of exceptions to the one-limiter rule leaves one out: when RTSS is out of it for the run because its profile cannot be written (no administrator rights) or its hooks library does not load, a limit the player set in RTSS itself (Global or the game's .cfg, a frame time limit, scanline sync) still holds the game while the game's own limiter paces it. rtss_limit.c watch worked the second limiter out only for a kept-out want, so neither the "two limiters" line nor anything else said so; only the "settings for the game" line showed the values. rtss_decide.h now has rtss_out_of_limit (kept out, or failed with RTSS_FAIL_READONLY or RTSS_FAIL_LIBRARY; a run the frame count check gave up on is left out, since RTSS was seen not to hold the game), and rtss_two takes the failure. watch gets S.fail and logs the two-limiter line for those runs too, and logs it again when the other limiter changes (a failed run that then keeps RTSS out for low latency). The menu is unchanged: its two-limiter note (rtss_limit_state 4) stays for a kept-out want, and a read-only profile keeps its administrator note (state 2). Log only: no pacing decision changes. The docs' exceptions sentence names the case and what the log and the menu show. tests/rtss_worker_check.c readonly_two and library_two run it with a limit in Global; both fail on the code before this change (no two-limiter line). rtss_limit_check.c's two() covers the failures. rtss_limit_check passes 26 of 26, check_content passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -367,14 +367,21 @@ static void closed_and_library(void) {
|
||||
CHECK(!strcmp(t, "RivaTuner Statistics Server is not running"), "%s", t);
|
||||
}
|
||||
|
||||
// Two limiters: kept out, listed and a limit of RTSS's own; never for a limit the game hands RTSS.
|
||||
// Two limiters: RTSS out of the game's limit (kept out, or a profile that cannot be written or a hooks library that did
|
||||
// not load), listed and a limit of RTSS's own; never for a limit the game hands RTSS.
|
||||
static void two(void) {
|
||||
CHECK(rtss_two(RTSS_OUT_SETTING, 1, 1) && rtss_two(RTSS_OUT_FRAMEGEN, 1, 1) && rtss_two(RTSS_OUT_LOWLAT, 1, 1),
|
||||
CHECK(rtss_two(RTSS_OUT_SETTING, 0, 1, 1) && rtss_two(RTSS_OUT_FRAMEGEN, 0, 1, 1) &&
|
||||
rtss_two(RTSS_OUT_LOWLAT, 0, 1, 1),
|
||||
"every reason");
|
||||
CHECK(!rtss_two(RTSS_OUT_SETTING, 0, 1), "not listed: RTSS holds nothing");
|
||||
CHECK(!rtss_two(RTSS_OUT_SETTING, 1, 0), "no limit of its own");
|
||||
CHECK(!rtss_two(60000, 1, 1) && !rtss_two(0, 1, 1), "the game's limit in RTSS: one limiter");
|
||||
CHECK(!rtss_two(RTSS_UNSET, 1, 1), "no want yet");
|
||||
CHECK(!rtss_two(RTSS_OUT_SETTING, 0, 0, 1), "not listed: RTSS holds nothing");
|
||||
CHECK(!rtss_two(RTSS_OUT_SETTING, 0, 1, 0), "no limit of its own");
|
||||
CHECK(!rtss_two(60000, 0, 1, 1) && !rtss_two(0, 0, 1, 1), "the game's limit in RTSS: one limiter");
|
||||
CHECK(!rtss_two(RTSS_UNSET, 0, 1, 1) && !rtss_two(RTSS_UNSET, RTSS_FAIL_READONLY, 1, 1), "no want yet");
|
||||
CHECK(rtss_two(60000, RTSS_FAIL_READONLY, 1, 1) && rtss_two(0, RTSS_FAIL_LIBRARY, 1, 1),
|
||||
"out for the run: the profile cannot be written, or the hooks library did not load");
|
||||
CHECK(!rtss_two(60000, RTSS_FAIL_READONLY, 0, 1) && !rtss_two(60000, RTSS_FAIL_LIBRARY, 1, 0),
|
||||
"out for the run, but not listed or no limit of its own");
|
||||
CHECK(!rtss_two(60000, RTSS_FAIL_NOT_LIMITING, 1, 1), "RTSS seen not to hold the game: not counted");
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
|
||||
Reference in New Issue
Block a user