mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 23:19:57 -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:
@@ -226,10 +226,17 @@ typedef struct {
|
||||
// RTSS holds the game's frames by a setting of its own.
|
||||
static inline int rtss_settings_limit(const RtssSettings *s) { return s->limit || s->time || s->scan0 || s->scan1; }
|
||||
|
||||
// Two limiters: RTSS is kept out of the game's limit, and while it lists the game a setting of its own still holds the
|
||||
// frames (rtss_settings_limit), beside the game's limiter, the driver's or frame generation's.
|
||||
static inline int rtss_two(int64_t want, int listed, int own_limit) {
|
||||
return want < 0 && want != RTSS_UNSET && listed && own_limit;
|
||||
// RTSS has no part in the game's limit although it may list the game: the want keeps it out, or it is out for the run
|
||||
// because its profile cannot be written or its hooks library did not load. A run whose frame count check gave up on
|
||||
// RTSS does not count: RTSS was seen not to hold the game.
|
||||
static inline int rtss_out_of_limit(int64_t want, int fail) {
|
||||
return want != RTSS_UNSET && (want < 0 || fail == RTSS_FAIL_READONLY || fail == RTSS_FAIL_LIBRARY);
|
||||
}
|
||||
|
||||
// Two limiters: RTSS is out of the game's limit (rtss_out_of_limit), and while it lists the game a setting of its own
|
||||
// still holds the frames (rtss_settings_limit), beside the game's limiter, the driver's or frame generation's.
|
||||
static inline int rtss_two(int64_t want, int fail, int listed, int own_limit) {
|
||||
return rtss_out_of_limit(want, fail) && listed && own_limit;
|
||||
}
|
||||
|
||||
// "limit L/D, frame time limit T/TD, scanline sync S0/S1", and with modes ", display sync X, Reflex sleep R, passive
|
||||
|
||||
Reference in New Issue
Block a user