mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 19:39:57 -04:00
Hand the frame limit to RivaTuner Statistics Server where it runs, and take it back when RTSS does not hold to it.
Where RTSS is installed and running, the frame limit from the menu goes into RTSS's profile for the game's executable through RTSS's hooks library, loaded at run time, and the game's own pacer stands aside while RTSS has hooked the game. Menu changes apply live, unlimited clears the limit, and closing the game (or any exit path) puts back what the profile held, or removes a profile the game created. Each change is read back from the saved profile: without administrator rights RTSS's profile folder cannot be written, and the game then keeps its own limiter. While RTSS limits, RTSS's own frame counter for the game is checked against the limit; well past it for three seconds, the game takes the limiting back for the run. The log says which limiter is in use and why, and a note under the frame-rate row says when RTSS limits, when its profile is read-only, and when it does not hold the game to the limit. rtss = 0 and frame generation keep RTSS out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -298,6 +298,12 @@ uint64_t frame_step_cap_ns(void); // with the real-time
|
||||
int frame_limit_adjustable(void); // the frame limit setting changes the rate (always)
|
||||
int frame_free_running(void); // no fps60/realtime patch set: the game steps by the clock
|
||||
double frame_step_limit_hz(void); // the frame rate the limit gives (overlay); 0 unknown
|
||||
// rtss_limit.c: RivaTuner Statistics Server takes the frame limit where it runs
|
||||
void rtss_limit_want(int64_t mhz); // the pacer's limit in millihertz: >0, 0 none, -1 keep RTSS out
|
||||
int rtss_limit_active(void); // RTSS limits this process: the pacer holds no frames
|
||||
int rtss_limit_state(void); // menu: 1 RTSS limits, 2 its profile is read-only, 3 it let the
|
||||
// game run past its limit
|
||||
void rtss_limit_restore(void); // before the process ends: the profile's old limit back
|
||||
int64_t frame_step_world_us(void); // game time since the loaded save's first frame, -1 before
|
||||
// (NX2NAVI_FPS_LIMIT, live)
|
||||
uint64_t frame_step_ticks(void); // game time since the first present in 60 Hz ticks (input scripts)
|
||||
|
||||
Reference in New Issue
Block a user