Say that a later limit loads RivaTuner Statistics Server's hooks library in a run kept out at its start.

The review found docs/architecture.md claiming that a run kept out of RTSS from its first present never loads the hooks
library, its thread only reading RTSS's settings. That holds only for NX2NAVI_RTSS=0: once frame generation or low
latency is switched off, a limit is wanted, rtss_decide.h rtss_wants_hooks lets the poll load the library, and the
limit goes into the profile as usual (tests/rtss_worker_check.c kept_lowlat_then_limit). The paragraph now says that
the thread reads only while RTSS is kept out, that a later limit loads the library, and that NX2NAVI_RTSS=0 keeps the
thread read-only for the run; it also says the profile gets back what it held before the run changed it. The same claim
is corrected in rtss_limit.c's header and read_settings comments, in rtss_decide.h rtss_wants_hooks's comment, and in
find_rtss's start-up line for a kept-out first want, which now says the thread only reads while RTSS is kept out.

Docs, comments and one log line's wording: rtss_limit_check passes 24 of 24, check_content passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 17:49:29 -05:00
parent 9c32d3bca9
commit fa229f94f8
3 changed files with 12 additions and 9 deletions

View File

@@ -113,7 +113,7 @@ typedef struct {
} RtssOut;
// The hooks library is loaded only on a poll that may write the profile: a limit is wanted, RTSS is not out of it for
// the run, and it runs. A kept-out run never loads it.
// the run, and it runs. A poll of a kept-out want never loads it; a later limit does.
static inline int rtss_wants_hooks(const RtssState *s, const RtssIn *in) {
return in->want >= 0 && !s->fail && in->app.running;
}

View File

@@ -28,8 +28,9 @@
//
// NX2NAVI_RTSS=0 keeps RTSS out of it. Frame generation keeps it out too (RTSS counts every presented frame, the
// generated ones included), and so does a driver's low latency (vk_lowlat.c), which holds the frames where they start.
// Kept out, the thread never loads the hooks library: it only reads RTSS's own settings for the game, to tell when they
// limit it a second time (watch).
// While RTSS is kept out the thread does not load the hooks library and only reads RTSS's own settings for the game, to
// tell when they limit it a second time (watch); a later limit (frame generation or low latency switched off) loads it
// and hands RTSS the limit as usual, and NX2NAVI_RTSS=0 keeps the thread read-only for the run.
#include <stdatomic.h>
#include <stdint.h>
#include <stdio.h>
@@ -233,7 +234,7 @@ static void set_active(int64_t w, int on, const char *why) {
// RTSS's own settings for the game, read from its profile file as RTSS keeps it: Profiles\<exe>.cfg, else
// Profiles\Global, and a key the game's profile lacks from Global. The system's ini reader does it, so no call goes into
// RTSS's hooks library, which a run that keeps RTSS out never loads. The files are read again only when the time
// RTSS's hooks library, which a poll of a kept-out want never loads. The files are read again only when the time
// either was written changes. Worker thread only, while RTSS lists the game (watch).
static RtssSettings settings;
static char settings_file[MAX_PATH + 16]; // which file they came from, as Profiles\<name>
@@ -334,8 +335,9 @@ static int find_rtss(void) {
if (first >= 0)
rt_log("frame rate: RivaTuner Statistics Server found in %s; it takes the frame limit while it runs", dir);
else
rt_log("frame rate: RivaTuner Statistics Server found in %s; kept out (%s), so its thread only reads RTSS's own "
"settings for the game, to tell when RTSS limits it a second time", dir, rtss_out_text(first));
rt_log("frame rate: RivaTuner Statistics Server found in %s; kept out (%s), and while it is kept out its thread "
"only reads RTSS's own settings for the game, to tell when RTSS limits it a second time", dir,
rtss_out_text(first));
return 1;
}