mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 04:59:57 -04:00
Unlock the frame rate, shorten cold starts, and describe the Ocarina build in the docs.
Ocarina steps its game by the clock (the same frame-numbered walk covers half the distance at 120 fps), so in a build without the fps60 and realtime patch sets the pacer holds frames to the frame limit alone: any rate from 30 to 1000, the monitor's rate, or unlimited (164 fps average in Kokiri Forest). The menu always shows the row, with 165, 240 and Unlimited added. NX2NAVI_PACE_HZ sets the pacer's rate for tests. A compute pipeline is compiled outside the pipeline lock, and one compile serves the replay and the boot prebuild alike; the prebuild uses half the CPUs. The guest waits at most NX2NAVI_PREWARM_WAIT_MS (3000) for the boot prewarm, which then goes on in the background (a cold start waited 9.8 s). NX2NAVI_TEST_PAD_AT attaches the test gamepad late and presses it, to test a controller switched on in play. README, docs/architecture.md, docs/controls.md and AGENTS.md describe the Ocarina build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -735,7 +735,10 @@ NVN_API(nvnWindowSetCrop) {
|
||||
// 2nd or 3rd tick would only add latency and 50 ms frames.
|
||||
#define VSYNC_HZ 60ull
|
||||
static uint64_t present_period(const win_t *o) {
|
||||
if (frame_step_realtime()) return frame_step_cap_ns();
|
||||
if (frame_step_realtime() || frame_free_running()) return frame_step_cap_ns(); // frame_rate.c: the limit alone
|
||||
static int pace_hz = -1; // NX2NAVI_PACE_HZ=<n> (test runs): present at n per second whatever the game's interval
|
||||
if (pace_hz < 0) pace_hz = cfg_get("NX2NAVI_PACE_HZ") ? atoi(cfg_get("NX2NAVI_PACE_HZ")) : 0;
|
||||
if (pace_hz > 0) return 1000000000ull / (uint64_t)pace_hz;
|
||||
return (o->interval > 0 ? (uint64_t)o->interval : 1ull) * 1000000000ull / VSYNC_HZ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user