diff --git a/Keeper/dllmain.cpp b/Keeper/dllmain.cpp index 8f28ad5..c00bb5a 100644 --- a/Keeper/dllmain.cpp +++ b/Keeper/dllmain.cpp @@ -177,16 +177,17 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) Offsets::ProcessEvent = static_cast(gProcessEventOffset);// Update ProcessEvent offset } } - - logger->info("-------------- Fixes initialisation -------------"); } + if (g_fix_enabled) + logger->info("-------------- Fixes initialisation -------------"); if (!init && FOVaddress) FOVFixEnabled(); if (!init && Ultrawideaddress) UltrawideFixEnabled(); if (!init && DOFaddress) DOFFixEnabled(); if (!init && CAaddress) CAFixEnabled(); if (!init && Vignettingaddress) VignettingFixEnabled(); if (!init && Fogaddress) FogFixEnabled(); + if (!init && GObjectsaddress && AppendStringaddress && ProcessEventaddress) EnableConsole(); } // Setters for Reshade addon call @@ -254,7 +255,7 @@ static void UltrawideFixEnabled() { FOVFixEnabled(); logger->info("Aspect fix enabled"); } - if (!(g_fix_enabled && g_ultrawide_fix_enabled)) { + if (!(g_fix_enabled && g_ultrawide_fix_enabled) && Ultrawideaddress) { if (AspectHook) AspectHook.disable(); logger->info("Aspect ratio fix disabled"); } @@ -315,19 +316,10 @@ static void FogFixEnabled() { // UE Console creation static void EnableConsole() { - if (g_Console_Enabled) return; - if (!g_Console) { - logger->info("------------------ User inputs ------------------"); + if (g_Console_Enabled || !g_Console || !GObjectsaddress || !AppendStringaddress || !ProcessEventaddress) return; - } logger->info("-------------- Console re-enabling --------------"); - if (!GObjectsaddress || !AppendStringaddress || !ProcessEventaddress) { - logger->warn("Could not re-enable console"); - logger->info("------------------ User inputs ------------------"); - return; - } - std::thread([&]() { auto start = std::chrono::high_resolution_clock::now(); // Measure the time to renable console UEngine* Engine = nullptr; @@ -368,6 +360,7 @@ static void EnableConsole() } else { logger->error("Could not spawn console object"); + logger->info("------------------ User inputs ------------------"); } }).detach(); }