fix XeSS double hooking

This commit is contained in:
cdozdil committed 2025-03-02 15:14:18 +03:00
1 parent 22c6981ba0
commit 5c3b03e080
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -364,7 +364,7 @@ inline static HMODULE LoadLibraryCheck(std::string lcaseLibName, LPCSTR lpLibFul
{
auto module = o_LoadLibraryA(lcaseLibName.c_str());
if (module != nullptr)
XeSSProxy::HookXeSS(module);
XeSSProxy::InitXeSS(module);
return module;
}
@@ -608,7 +608,7 @@ inline static HMODULE LoadLibraryCheckW(std::wstring lcaseLibName, LPCWSTR lpLib
{
auto module = o_LoadLibraryW(lcaseLibName.c_str());
if (module != nullptr)
XeSSProxy::HookXeSS(module);
XeSSProxy::InitXeSS(module);
return module;
}
+1 -1
View File
@@ -121,7 +121,6 @@ private:
return _dll != nullptr;
}
public:
static bool HookXeSS(HMODULE xessModule)
{
LOG_INFO("Trying to hook XeSS");
@@ -217,6 +216,7 @@ DetourAttach(&(PVOID&)_##name, name)
return true;
}
public:
static bool InitXeSS(HMODULE xessModule = nullptr)
{
// if dll already loaded