diff --git a/src/dxgi/dxgi.def b/src/dxgi/dxgi.def index 537104575..39417b5fb 100644 --- a/src/dxgi/dxgi.def +++ b/src/dxgi/dxgi.def @@ -3,3 +3,4 @@ EXPORTS CreateDXGIFactory CreateDXGIFactory1 CreateDXGIFactory2 + DXGIDeclareAdapterRemovalSupport diff --git a/src/dxgi/dxgi_main.cpp b/src/dxgi/dxgi_main.cpp index 0ca0f2b1e..0d09f0433 100644 --- a/src/dxgi/dxgi_main.cpp +++ b/src/dxgi/dxgi_main.cpp @@ -34,4 +34,14 @@ extern "C" { DLLEXPORT HRESULT __stdcall CreateDXGIFactory(REFIID riid, void **ppFactory) { return dxvk::createDxgiFactory(0, riid, ppFactory); } + + DLLEXPORT HRESULT __stdcall DXGIDeclareAdapterRemovalSupport() { + static bool enabled = false; + + if (std::exchange(enabled, true)) + return 0x887a0036; // DXGI_ERROR_ALREADY_EXISTS; + + dxvk::Logger::warn("DXGIDeclareAdapterRemovalSupport: Stub"); + return S_OK; + } } \ No newline at end of file