mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-05-04 00:31:35 +00:00
Hook FSR 4 SDK at proxy level
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user