Check proxy first, might need re-init logic

This commit is contained in:
cdozdil
2025-04-22 01:15:35 +03:00
parent 6f7be6eb77
commit 4b2cc127a2
+14 -2
View File
@@ -777,6 +777,9 @@ private:
static HMODULE LoadLibxess(std::wstring originalPath)
{
if (XeSSProxy::Module() != nullptr)
return XeSSProxy::Module();
HMODULE libxess = nullptr;
if (Config::Instance()->XeSSLibrary.has_value())
@@ -815,6 +818,9 @@ private:
static HMODULE LoadLibxessDx11(std::wstring originalPath)
{
if (XeSSProxy::ModuleDx11() != nullptr)
return XeSSProxy::ModuleDx11();
HMODULE libxess = nullptr;
if (Config::Instance()->XeSSDx11Library.has_value())
@@ -853,6 +859,9 @@ private:
static HMODULE LoadFfxapiDx12(std::wstring originalPath)
{
if (FfxApiProxy::Dx12Module() != nullptr)
return FfxApiProxy::Dx12Module();
HMODULE ffxDx12 = nullptr;
if (Config::Instance()->FfxDx12Path.has_value())
@@ -891,6 +900,9 @@ private:
static HMODULE LoadFfxapiVk(std::wstring originalPath)
{
if (FfxApiProxy::VkModule() != nullptr)
return FfxApiProxy::VkModule();
HMODULE ffxVk = nullptr;
if (Config::Instance()->FfxVkPath.has_value())
@@ -1023,7 +1035,7 @@ private:
std::wstring libName(lpLibFileName);
std::wstring lcaseLibName(libName);
LOG_DEBUG("{}", wstring_to_string(lcaseLibName));
LOG_TRACE("{}", wstring_to_string(lcaseLibName));
for (size_t i = 0; i < lcaseLibName.size(); i++)
lcaseLibName[i] = std::tolower(lcaseLibName[i]);
@@ -1371,7 +1383,7 @@ public:
// These hooks cause stability regressions
//o_KB_FreeLibrary = KernelBaseProxy::Hook_FreeLibrary(hk_KB_FreeLibrary);
if (State::Instance().gameQuirk == Minecraft)
if (State::Instance().gameQuirk == KernelBaseHooks)
{
o_KB_LoadLibraryExA = KernelBaseProxy::Hook_LoadLibraryExA(hk_KB_LoadLibraryExA);
o_KB_LoadLibraryExW = KernelBaseProxy::Hook_LoadLibraryExW(hk_KB_LoadLibraryExW);