victory-gta6: this fork's changes on top of VIctory main (ffe310e)
World rendering, lighting, frame-rate and memory work for Grand Theft Auto VI (Xbox Series X profile) on one Windows PC with an NVIDIA RTX 4070. The README describes the state, the changes and the credits. Based on VIctory by Marvisak and contributors (GPL-3.0-or-later); XCL by ivall and contributors was used as a reference. No game files are included. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
45c6e80601
commit
6fa814fba5
61 files changed
+32259
-1274
No files matched your search
@@ -219,6 +219,27 @@ struct Mode {
|
||||
}
|
||||
const _: () = assert!(size_of::<Mode>() == 32);
|
||||
|
||||
/// The size of the display the console reports: `VICTORY_DISPLAY_MODE=WxH`
|
||||
/// if set (as a console reports the television it is plugged into: a
|
||||
/// Series X on a 1080p set lists a 1080p mode), else 3840x2160.
|
||||
/// shortcut: not yet the host display's own size by default; make it so
|
||||
/// once a title is seen to render for the mode it is given.
|
||||
fn display_size() -> (u32, u32) {
|
||||
static SIZE: std::sync::OnceLock<(u32, u32)> = std::sync::OnceLock::new();
|
||||
*SIZE.get_or_init(|| {
|
||||
let asked = std::env::var("VICTORY_DISPLAY_MODE").ok().and_then(|v| {
|
||||
let (w, h) = v.trim().split_once(['x', 'X'])?;
|
||||
Some((w.trim().parse::<u32>().ok()?, h.trim().parse::<u32>().ok()?))
|
||||
});
|
||||
let size = match asked {
|
||||
Some((w, h)) if (640..=7680).contains(&w) && (360..=4320).contains(&h) => (w, h),
|
||||
_ => (3840, 2160),
|
||||
};
|
||||
tracing::info!(width = size.0, height = size.1, "display mode reported to the title");
|
||||
size
|
||||
})
|
||||
}
|
||||
|
||||
/// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks
|
||||
/// for a 120 Hz one to allow 120 Hz frame intervals).
|
||||
/// shortcut: fixed mode, not the host display's; report the host's rates if
|
||||
@@ -242,9 +263,10 @@ extern "system" fn modes(
|
||||
return MORE_DATA;
|
||||
}
|
||||
*count = 1;
|
||||
let (width, height) = display_size();
|
||||
let mode = Mode {
|
||||
width: 3840,
|
||||
height: 2160,
|
||||
width,
|
||||
height,
|
||||
refresh: [60, 1],
|
||||
format: 0,
|
||||
scanlines: 1, // progressive
|
||||
|
||||
Reference in new issue
Block a user