Hook FSR 4 SDK at proxy level

This commit is contained in:
FakeMichau
2026-04-26 18:15:30 +02:00
parent 7b02c89bcc
commit ff60080aa9
3 changed files with 2 additions and 6 deletions
-1
View File
@@ -990,7 +990,6 @@ static void CheckWorkingMode()
if (ffxDx12SRModule != nullptr)
{
LOG_DEBUG("amd_fidelityfx_upscaler_dx12.dll already in memory");
FSR4ModelSelection::Hook(ffxDx12SRModule, FSR4Source::SDK);
FfxApiProxy::InitFfxDx12_SR(ffxDx12SRModule);
}
-5
View File
@@ -199,11 +199,6 @@ struct AmdExtFfxApi : public IAmdExtFfxApi
LOG_INFO("amdxcffx64 loaded from game folder");
}
auto sdk2upscalingModule = KernelBaseProxy::GetModuleHandleA_()("amd_fidelityfx_upscaler_dx12.dll");
if (sdk2upscalingModule)
FSR4ModelSelection::Hook(sdk2upscalingModule, FSR4Source::SDK);
if (moduleAmdxcffx64)
{
FSR4ModelSelection::Hook(moduleAmdxcffx64, FSR4Source::DriverDll);
+2
View File
@@ -396,6 +396,8 @@ class FfxApiProxy
if (upscaling_dx12.dll != nullptr)
{
FSR4ModelSelection::Hook(upscaling_dx12.dll, FSR4Source::SDK);
wchar_t modulePath[MAX_PATH];
DWORD len = GetModuleFileNameW(upscaling_dx12.dll, modulePath, MAX_PATH);
upscaling_dx12.filePath = std::wstring(modulePath);