Remove the uncertain ultrawide injection delay

This commit is contained in:
2026-03-23 20:48:01 +01:00
parent 237f8bbf69
commit 35c8ce97fa

View File

@@ -125,13 +125,10 @@ static void UltraWideFixEnabled() {
if (!Ultrawideaddress || !Cutscenesaddress) return;
if (g_fix_enabled && g_ultrawide_fix_enabled) {
if (!UWHook) {
std::thread([]() {
Sleep(5000); // Necessary here to avoid CTD on launch
UWHook = safetyhook::create_mid(Ultrawideaddress,
[](SafetyHookContext& ctx) {
ctx.xmm0.f32[0] = g_AspectRatio;
});
}).detach();
UWHook = safetyhook::create_mid(Ultrawideaddress,
[](SafetyHookContext& ctx) {
ctx.xmm0.f32[0] = g_AspectRatio;
});
}
else UWHook.enable();
Memory::PatchBytes(Cutscenesaddress, "\x90\xE9", 2);