mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-09-27 15:56:48 +00:00
Check proxy first, might need re-init logic
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user