diff --git a/StyxShardsOFDarkness/dllmain.cpp b/StyxShardsOFDarkness/dllmain.cpp index 28674e8..e52e664 100644 --- a/StyxShardsOFDarkness/dllmain.cpp +++ b/StyxShardsOFDarkness/dllmain.cpp @@ -95,6 +95,8 @@ static void ProcessEvent(); extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) { g_fix_enabled = enabled; if (!AOBScanDone) { // Unreal Engine 4.13.1 + logger = InitializeLogger("Styx: Shards Of Darkness", PLUGIN_LOG); + logger->info("Plugin {} loaded.", PLUGIN_NAME); logger->info("--------------- AOB scan started ---------------"); constexpr auto CameraComponentStringObfuscated = make_obfuscated<0xF3>("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89"); constexpr auto FOVStringObfuscated = make_obfuscated<0x9C>("F3 0F ?? ?? 48 8B ?? ?? 48 ?? ?? 4C 8D ?? ?? 48"); @@ -262,7 +264,6 @@ static void CameraDistanceFixEnabled() { if (CameraDistanceHook) CameraDistanceHook.disable(); if (CameraHeightHook) CameraHeightHook.disable(); } - logger->info("Camera distance fix {}", g_fix_enabled && g_Camera_fix_enabled ? "enabled" : "disabled"); } @@ -304,6 +305,7 @@ static void HUDFixEnabled() { if (HUD1Hook) HUD1Hook.disable(); if (HUD2Hook) HUD2Hook.disable(); } + logger->info("HUD & UI fix {}", g_fix_enabled && g_HUD_fix_enabled ? "enabled" : "disabled"); } static void DOFFixEnabled() { @@ -430,11 +432,7 @@ static void EnableConsole() { } // Standard dll entry BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID) { - if (reason == DLL_PROCESS_ATTACH) { - logger = InitializeLogger("Styx: Shards Of Darkness", PLUGIN_LOG); - logger->info("Plugin {} loaded.", PLUGIN_NAME); - } - else if (reason == DLL_PROCESS_DETACH) { + if (reason == DLL_PROCESS_DETACH) { logger->info("Plugin {} unloaded.", PLUGIN_NAME); spdlog::drop_all(); }