mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 03:39:57 -04:00
Round a fractional limit down for a RivaTuner Statistics Server without the denominator field, so "display" never holds the game above the refresh.
apply() rounded the millihertz to the nearest whole frame where RTSS has no FramerateLimitDenominator, so "display" on a 59.94 Hz monitor wrote 60 and on a 143.856 Hz one 144: above the refresh, one frame more than the monitor shows every 17 s and every 7 s. Only "display" asks a fractional rate under RTSS (fixed limits and movie rates are whole, frame generation keeps RTSS out), so the new rtss_decide.h rtss_limit_value rounds every fraction down when the denominator is missing (59/1, 143/1), and keeps a whole rate over 1 and a fraction over 1000 where RTSS knows the denominator. VRR and present-wait handling stay to be measured. Not reproduced before the change. rtss_limit_check (T15: rtss_limit_value at 59940, 60000, 143856, 0 and 240000 with and without the denominator) and rtss_worker_check (round_logged_whole now 59/1 and 143/1, round_logged) pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -578,7 +578,8 @@ static void active_logged(void) {
|
||||
}
|
||||
|
||||
// A limit of a fractional monitor (display at 59.94 and 143.856 Hz): an RTSS that knows the denominator holds it as it
|
||||
// is, one that does not holds it rounded to whole frames, and the log says what the profile holds, not what was asked.
|
||||
// is, one that does not holds it rounded down to whole frames, never above the refresh, and the log says what the
|
||||
// profile holds, not what was asked.
|
||||
static void round_logged(void) {
|
||||
app_set(1, 0xA, 1000, 2000, 60);
|
||||
ask(59940);
|
||||
@@ -593,10 +594,11 @@ static void round_logged_whole(void) {
|
||||
ask(59940);
|
||||
poll();
|
||||
show("display at 59.94 Hz, RTSS without a denominator");
|
||||
CHECK(own.limit == 60, "rounded to whole frames");
|
||||
CHECK(logged("profile ocarina.exe limits to 60/1 (60.000 fps; the game asked 59.940)"), "the log names 60/1");
|
||||
CHECK(own.limit == 59, "rounded down to whole frames");
|
||||
CHECK(logged("profile ocarina.exe limits to 59/1 (59.000 fps; the game asked 59.940)"), "the log names 59/1");
|
||||
settle(143856);
|
||||
CHECK(logged("profile ocarina.exe limits to 144/1 (144.000 fps; the game asked 143.856)"), "the log names 144/1");
|
||||
CHECK(own.limit == 143, "143.856 rounded down");
|
||||
CHECK(logged("profile ocarina.exe limits to 143/1 (143.000 fps; the game asked 143.856)"), "the log names 143/1");
|
||||
settle(60000);
|
||||
CHECK(logged("profile ocarina.exe limits to 60.000 fps\n"), "a whole limit as it is");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user