Move Kernel32 hooks to the end of working mode checks

This commit is contained in:
cdozdil
2025-04-21 18:02:51 +03:00
parent 6b37be25ed
commit 0337158d6a
+3 -3
View File
@@ -567,9 +567,6 @@ static void CheckWorkingMode()
if (Config::Instance()->OverlayMenu.value() && vulkanModule != nullptr)
HooksVk::HookVk(vulkanModule);
// Hook kernel32 methods
KernelHooks::Hook();
// NVAPI
HMODULE nvapi64 = nullptr;
nvapi64 = KernelBaseProxy::GetModuleHandleW_()(L"nvapi64.dll");
@@ -662,6 +659,9 @@ static void CheckWorkingMode()
reshadeHandle = KernelBaseProxy::LoadLibraryExW_()(rsFile.c_str(), NULL, 0);
LOG_INFO("Loading ReShade64.dll, result: {0:X}", (size_t)reshadeHandle);
}
// Hook kernel32 methods
KernelHooks::Hook();
}
return;