Skip to content

Commit 1ffae89

Browse files
committed
replace 1280x1024 string in options menu with 1920x1080 (despite the menu no longer working :()
1 parent c93984f commit 1ffae89

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mod-high-res/src/ffi.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{
22
arch::global_asm,
3-
ffi::c_void,
3+
ffi::{c_void, CStr},
44
mem, ptr,
55
sync::atomic::{AtomicPtr, Ordering},
66
};
@@ -13,6 +13,8 @@ use p3_api::{
1313
};
1414
use windows::core::PCSTR;
1515

16+
const FULLHD_STRING: &CStr = c"1920 x 1080";
17+
1618
const CALCULATE_RESOLUTION_ON_OPTIONS_MENU_CLOSE_PATCH_ADDRESS: u32 = 0x00423BBD;
1719
static CALCULATE_RESOLUTION_ON_OPTIONS_MENU_CLOSE_CONTINUATION: u32 = 0x00423C00;
1820

@@ -131,6 +133,9 @@ pub unsafe extern "C" fn start() -> u32 {
131133
Err(_) => return 8,
132134
}
133135

136+
let resolution_pcstr_ptr: *mut *const i8 = 0x0069AE40 as _;
137+
*resolution_pcstr_ptr = FULLHD_STRING.as_ptr();
138+
134139
debug!("Mod loaded successfully");
135140
0
136141
}

0 commit comments

Comments
 (0)