From c9c61e726f5c631a9d2b751470811076815fa2d2 Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 13 Nov 2026 17:55:18 -0500 Subject: [PATCH] Wrap the lines the review's fixes left long in the RTSS docs, code and checks. Rereading the fixes for the review showed lines past the 120 columns the files keep to: the RTSS paragraph of docs/architecture.md ran one line to 176 columns after its hooks library sentence was replaced, rtss_limit.c had three lines just over (the creations and removals counters, the removed line, find_rtss's kept-out line), and tests/rtss_worker_check.c three. They are wrapped; no text, log line or check changes. rtss_limit_check passes 27 of 27, check_content passes. Co-Authored-By: Claude Opus 5.5 --- docs/architecture.md | 9 +++++---- runtime/rtss_limit.c | 10 +++++----- tests/rtss_worker_check.c | 10 ++++++---- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index 1544c6d7..eb7421ac 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -273,10 +273,11 @@ keeps per-core data without locks and relies on that, so the host models it (`ru 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. + 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. - Measuring pacing: `NX2NAVI_TRACE=present` logs a line per picture (the host present's interval, the game's present interval, the wait for the slot and how far past it the present went), `NX2NAVI_TRACE=perf` each wait's share of the frame ("bound:"), and `tools/perf_summary.py` condenses both. Both measure before the host present, so a wait RTSS diff --git a/runtime/rtss_limit.c b/runtime/rtss_limit.c index a545c168..30ff4147 100644 --- a/runtime/rtss_limit.c +++ b/runtime/rtss_limit.c @@ -68,7 +68,7 @@ static RtssState S = RTSS_STATE_INIT; // the worker's decisions (rtss_decide.h static int has_denominator; // this RTSS knows FramerateLimitDenominator static int had_profile; // the profile existed before this run changed it static DWORD old_limit, old_denominator = 1; -static int creations, removals; // the profile's "created" and "removed" lines this run, numbered for the log (under lock) +static int creations, removals; // the profile's "created" and "removed" lines this run, numbered (under lock) // RTSS's shared memory as rtss_parse reads it: whether RTSS runs, whether it lists this process, and its frame count. static void rtss_map(RtssApp *a) { @@ -201,8 +201,8 @@ static int apply(void *ctx, int64_t mhz, int first, int clear) { static void put_back(void) { if (!had_profile) { delete_profile(profile); - rt_log("frame rate: RivaTuner Statistics Server profile %s removed, as before the game started (removal %d this " - "run)", profile, ++removals); + rt_log("frame rate: RivaTuner Statistics Server profile %s removed, as before the game started " + "(removal %d this run)", profile, ++removals); } else if (write_limit(old_limit, old_denominator) > 0) { rt_log("frame rate: RivaTuner Statistics Server profile %s has its limit of %lu/%lu back", profile, old_limit, old_denominator); @@ -342,8 +342,8 @@ 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), 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, + 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; } diff --git a/tests/rtss_worker_check.c b/tests/rtss_worker_check.c index 1e6a4599..42e63824 100644 --- a/tests/rtss_worker_check.c +++ b/tests/rtss_worker_check.c @@ -460,8 +460,8 @@ static void active_race(void) { } // Frame generation switched on while the worker writes the first limit: RTSS holds that limit, but the game's limiter -// paces the kept-out want, so the log must not say RTSS does the limiting; the next poll logs the kept-out line. A later -// limit is held and logged as usual. +// paces the kept-out want, so the log must not say RTSS does the limiting; the next poll logs the kept-out line. A +// later limit is held and logged as usual. static void framegen_on(void) { rtss_limit_want(RTSS_OUT_FRAMEGEN); } static void active_logged(void) { app_set(1, 0xA, 1000, 2000, 60); @@ -473,7 +473,8 @@ static void active_logged(void) { CHECK(!logged("does the limiting"), "no line says RTSS does the limiting"); poll(); show("the next poll"); - CHECK(logged("the game's own limiter (RivaTuner Statistics Server kept out: frame generation)"), "the kept-out line"); + CHECK(logged("the game's own limiter (RivaTuner Statistics Server kept out: frame generation)"), + "the kept-out line"); CHECK(!logged("does the limiting"), "still no line says RTSS does the limiting"); ask(60000); poll(); @@ -596,7 +597,8 @@ static void readonly_two(void) { poll(); global.limit = 0, touch(&global); poll(); - CHECK(logged("RivaTuner Statistics Server no longer limits the game beside the game's limiter"), "logged once it ended"); + CHECK(logged("RivaTuner Statistics Server no longer limits the game beside the game's limiter"), + "logged once it ended"); CHECK(rtss_limit_state() == 2, "the administrator note again"); }