Some minor fixes

This commit is contained in:
2025-11-28 15:49:38 +01:00
parent 560d33cbcd
commit ba4de8c649

View File

@@ -216,6 +216,9 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init)
logger->info("Process Event offset is: 0x{:X}.", gProcessEventOffset);
Offsets::ProcessEvent = static_cast<UC::uint32>(gProcessEventOffset);// Update ProcessEvent offset
}
if (!init)
logger->info("-------------- Fixes initialisation -------------");
}
}
@@ -278,7 +281,13 @@ static void GetCamcorderState(void) {
CamCorderStateHook = safetyhook::create_mid(CamCorderaddress,
[](SafetyHookContext& ctx) {
if (!ctx.rcx) return;
g_CamCorderState = *reinterpret_cast<uint8_t*>(ctx.rcx + 0x2c4); // 0 - Camera down, 3 - Camera up and idle, 4 - camera up and recording
//0 EUNICamcorderState::Down
//1 EUNICamcorderState::TransitioningToDown
//2 EUNICamcorderState::TransitioningToUp
//3 EUNICamcorderState::Up_Idle
//4 EUNICamcorderState::Up_Recording
//5 EUNICamcorderState::EUNICamcorderState_MAX
g_CamCorderState = *reinterpret_cast<uint8_t*>(ctx.rcx + 0x2c4);
});
}
}
@@ -304,7 +313,7 @@ static void FOVFixEnabled() {
else FOVHook.enable();
logger->info("FOV fix enabled");
}
if (!(g_fix_enabled && g_fov_fix_enabled) && FOVaddress) {
if (!(g_fix_enabled && (g_fov_fix_enabled || g_ultrawide_fix_enabled)) && FOVaddress) {
if (FOVHook) FOVHook.disable();
logger->info("FOV fix disabled");
}
@@ -317,6 +326,7 @@ static void UltraWideFixEnabled() {
UltrawideHook = safetyhook::create_mid(Ultrawideaddress,
[](SafetyHookContext& ctx) {
ctx.xmm2.f32[0] = aspectRatio;
b_IsCinematicMode = false;
});
}
else UltrawideHook.enable();