Frame rate switch: VICTORY_FRAME_INTERVAL_MS (our clock) and the title's own 30 fps setting patched to match (off by default)

The title asks for 33,333 us (SetFrameIntervalX) because its graphics
settings hold a frame rate of 30 (settings +0x210): +0x1e0fb30 and
+0x22434a0 turn it into a frame time (+0x98f84ac), +0x247ab10 picks the
interval from it and the display's 60/120 Hz (a 120 Hz mode alone changes
nothing at 30), and +0x120530 is a QueryPerformanceCounter limiter of its
own at the same rate.

VICTORY_FRAME_INTERVAL_MS=<ms> (16.667, 8.333, 0 = no wait): frame.rs ticks
at that interval whatever the title sets; the loader makes the two loads of
the setting "mov eax, rate; nop" (rate = 1000/ms rounded, 0 = the title's
own "no limit"), with the original bytes checked. VICTORY_TITLE_FPS=<n>|off
overrides the rate or leaves the title alone. Diagnostics:
VICTORY_TIMER_LOG=1 logs the title's timers once a second and frame pacing
bands every 5 s.

Ported from Belobug/VIctory-Belobug-AMD 49cb83b (author: local); the descriptor-site module of renderer port 2 left out. Our VICTORY_FRAME_INTERVAL_US (our clock alone) still works; VICTORY_FRAME_INTERVAL_MS is read first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 authored and readmet3xt-lab committed 2026-11-27 01:08:53 +05:30
1 parent a83bc910a7
commit bacb402091
6 files changed
+468 -5

No files matched your search

+5
View File
@@ -113,6 +113,11 @@ pub fn switched(switch: &str) -> Option<bool> {
pub fn frame_phase() -> u32 {
copystat::phase()
}
/// Frames the title has begun (its frame waits that ended), for logs.
pub fn frames_begun() -> u64 {
frame::current()
}
#[cfg(windows)]
pub use inplace::{title_memory_freeing, title_memory_section, title_memory_section_gone, title_memory_view};
#[cfg(windows)]