mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
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:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user