mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 14:05:57 +00:00
Make the frame limit a setting: 30, 60, 120, 144 or the monitor's refresh rate
TOTK_FPS_LIMIT (fps_limit in totk.ini, live, menu row on the Game tab) replaces the 30/60 choice of TOTK_FPS60. The pacer holds frames to the limit in nanoseconds instead of 60 Hz ticks; the real-time step has no lower bound, so game speed stays 1.000 above 60. `display` follows the exact refresh rate of the window's monitor (QueryDisplayConfig), measured again when the window moves or the display mode changes. A limit of 30 switches the patch set fps60 off as before; unset, the older fps60 = 0 still means 30. Above 60 needs the real-time step and is marked experimental. The vsync event stays at 60 Hz: on 1.4.3 the title runs at 144 fps with it, so the game does not wait for it each frame. Field on machine A: 69-88 fps, CPU-bound (GPU 3.4 ms per frame). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cdecd014f6
commit
b1cbbb93a6
12 files changed
+155
-38
No files matched your search
+2
-2
@@ -229,8 +229,8 @@ void rt_patch_switch(int set, int on); // at run time (live
|
||||
void *rt_patch_page(void); // the page the patched code reads (NULL without the table)
|
||||
void frame_step_init(void); // after rt_patches_init: the real-time step's first value
|
||||
int frame_step_realtime(void); // the real-time step is on: presents ignore the interval
|
||||
int frame_step_cap_ticks(void); // with the real-time step: 60 Hz ticks per frame at most
|
||||
// (1 = 60 fps, 2 = 30 fps; TOTK_FPS60, live)
|
||||
uint64_t frame_step_cap_ns(void); // with the real-time step: the shortest frame in ns
|
||||
// (TOTK_FPS_LIMIT, live)
|
||||
void frame_step_present(uint64_t display_ns, int interval); // nvnQueuePresentTexture: the frame's display time and
|
||||
// present interval (60 Hz ticks)
|
||||
// ---- boot (boot.c T6, main.c T1)
|
||||
|
||||
Reference in new issue
Block a user