Change position of module instance check
@@ -26,6 +26,11 @@ static HANDLE s_modInstanceMutex = nullptr;
static void Initialize(HMODULE mod)
{
+
+ s_modInstanceMutex = CreateMutex(NULL, TRUE, _T("Cyber Engine Tweaks Module Instance"));
+ if (s_modInstanceMutex == nullptr)
+ return;
+
MH_Initialize();
Options::Initialize(mod);
@@ -41,10 +46,6 @@ static void Initialize(HMODULE mod)
return;
}
- s_modInstanceMutex = CreateMutex(NULL, TRUE, _T("Cyber Engine Tweaks Module Instance"));
- if (s_modInstanceMutex == nullptr)
- return;
-
if (options.PatchEnableDebug)
EnableDebugPatch(&options.GameImage);
