diff --git a/docs/architecture.md b/docs/architecture.md index a05396b4..90849208 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -268,9 +268,10 @@ keeps per-core data without locks and relies on that, so the host models it (`ru not run or has not hooked the game, for a limit RTSS refuses, and for the rest of the run when the profile cannot be written (no administrator rights), the hooks library does not load, or RTSS's own frame count of the game stays above 1.2 times the limit for six polls; the menu names the first and the last of these. Frame generation, the - driver's low latency and `NX2NAVI_RTSS=0` keep RTSS out (`RTSS_OUT_*`): the profile gets back what it held, and a - run kept out from its first present never loads the hooks library, its thread only reading RTSS's own settings for - the game. While RTSS lists the game the log names those settings (limit, frame time limit, scanline sync, display + driver's low latency and `NX2NAVI_RTSS=0` keep RTSS out (`RTSS_OUT_*`): the profile gets back what it held before + the run changed it, and while RTSS is kept out its thread does not load the hooks library and only reads RTSS's own + settings for the game; 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. While RTSS lists the game the log names those settings (limit, frame time limit, scanline sync, display sync, Reflex sleep, passive wait) once per change. Every orderly exit puts the profile back as it was before the run (`rtss_limit_restore`), and no want reaches it after that; a kill, the device-lost watchdog or a crash inside the crash handler leaves the game's limit in the profile, and the next run takes it for the player's own. diff --git a/runtime/rtss_decide.h b/runtime/rtss_decide.h index 2e6888b4..af73ba61 100644 --- a/runtime/rtss_decide.h +++ b/runtime/rtss_decide.h @@ -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; } diff --git a/runtime/rtss_limit.c b/runtime/rtss_limit.c index 4abee1cf..1f0e0f95 100644 --- a/runtime/rtss_limit.c +++ b/runtime/rtss_limit.c @@ -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 #include #include @@ -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\.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\ @@ -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; }