@@ -458,43 +458,23 @@ inline static HRESULT STDMETHODCALLTYPE hkAmdExtD3DCreateInterface(IUnknown* pOu
458
458
{
459
459
CheckForGPU ();
460
460
461
- if (!Config::Instance ()->Fsr4Update .value_or_default ())
461
+ if (!Config::Instance ()->Fsr4Update .value_or_default () && o_AmdExtD3DCreateInterface != nullptr )
462
462
return o_AmdExtD3DCreateInterface (pOuter, riid, ppvObject);
463
463
464
- // If querying IAmdExtFfxApi
465
- if (riid == __uuidof (IAmdExtFfxApi))
466
- {
467
- if (_amdExtFfxApi == nullptr )
468
- _amdExtFfxApi = new AmdExtFfxApi ();
469
-
470
- // Return custom one
471
- *ppvObject = _amdExtFfxApi;
472
-
473
- LOG_INFO (" IAmdExtFfxApi queried, returning custom AmdExtFfxApi" );
474
-
475
- return S_OK;
476
- }
477
-
478
- if (o_AmdExtD3DCreateInterface != nullptr )
479
- return o_AmdExtD3DCreateInterface (pOuter, riid, ppvObject);
480
-
481
- return E_NOINTERFACE;
482
- }
483
-
484
- inline static HRESULT STDMETHODCALLTYPE customAmdExtD3DCreateInterface (IUnknown* pOuter, REFIID riid, void ** ppvObject)
485
- {
486
- if (riid == __uuidof (IAmdExtFfxFirst))
464
+ // Proton bleeding edge ships amdxc64 that is missing some required functions
465
+ else if (riid == __uuidof (IAmdExtFfxFirst) && State::Instance ().isRunningOnLinux )
487
466
{
488
467
// Required for the custom AmdExtFfxApi, lack of it triggers visual glitches
489
468
if (_amdExtFfxFirst == nullptr )
490
469
_amdExtFfxFirst = new AmdExtFfxFirst ();
491
470
492
471
*ppvObject = _amdExtFfxFirst;
493
472
494
- LOG_INFO (" Custom IAmdExtFfxFirst queried, returning custom AmdExtFfxFirst" );
473
+ LOG_INFO (" IAmdExtFfxFirst queried, returning custom AmdExtFfxFirst" );
495
474
496
475
return S_OK;
497
476
}
477
+
498
478
else if (riid == __uuidof (IAmdExtFfxApi))
499
479
{
500
480
if (_amdExtFfxApi == nullptr )
@@ -503,11 +483,14 @@ inline static HRESULT STDMETHODCALLTYPE customAmdExtD3DCreateInterface(IUnknown*
503
483
// Return custom one
504
484
*ppvObject = _amdExtFfxApi;
505
485
506
- LOG_INFO (" Custom IAmdExtFfxApi queried, returning custom AmdExtFfxApi" );
486
+ LOG_INFO (" IAmdExtFfxApi queried, returning custom AmdExtFfxApi" );
507
487
508
488
return S_OK;
509
489
}
510
490
491
+ else if (o_AmdExtD3DCreateInterface != nullptr )
492
+ return o_AmdExtD3DCreateInterface (pOuter, riid, ppvObject);
493
+
511
494
return E_NOINTERFACE;
512
495
}
513
496
0 commit comments