Fix dxgi spoofing for amdxcffx64

This commit is contained in:
FakeMichau committed 2026-10-23 12:02:49 +02:00
1 parent 455ab392fe
commit 8f2a943589
1 file changed
+6 -2
+6 -2
View File
@@ -160,7 +160,11 @@ HRESULT DxgiSpoofing::hkGetDesc1(IDXGIAdapter1* This, DXGI_ADAPTER_DESC1* pDesc)
auto targetDeviceIdMatches = !Config::Instance()->TargetDeviceId.has_value() ||
Config::Instance()->TargetDeviceId.value() == pDesc->DeviceId;
if (pDesc->VendorId != VendorId::Microsoft && targetVendorIdMatches && targetDeviceIdMatches &&
// amdxcffx64 needs to see AMD vendor id
auto isFfxDriver = caller.starts_with("amdxcffx64");
auto keepRealAmd = isFfxDriver && pDesc->VendorId == VendorId::AMD;
if (pDesc->VendorId != VendorId::Microsoft && targetVendorIdMatches && targetDeviceIdMatches && !keepRealAmd &&
Config::Instance()->DxgiSpoofing.value_or_default() && !SkipSpoofing())
{
pDesc->VendorId = Config::Instance()->SpoofedVendorId.value_or_default();
@@ -175,7 +179,7 @@ HRESULT DxgiSpoofing::hkGetDesc1(IDXGIAdapter1* This, DXGI_ADAPTER_DESC1* pDesc)
#endif
}
if (caller.starts_with("amdxcffx64") || caller.starts_with("amd_fidelityfx_upscaler_dx12"))
if (isFfxDriver || caller.starts_with("amd_fidelityfx_upscaler_dx12"))
{
const auto primaryGpu = IdentifyGpu::getPrimaryGpu();