[dxgi] Add fake implementation of DxgiFactory::EnumWarpAdapter

Apparently FIFA 19 needs this.
This commit is contained in:
Philip Rebohle 2019-12-09 23:27:56 +01:00
parent 945a64252d
commit fc91fe1d34
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 12 additions and 2 deletions

View File

@ -228,8 +228,18 @@ namespace dxvk {
void** ppvAdapter) {
InitReturnPtr(ppvAdapter);
Logger::err("DxgiFactory::EnumWarpAdapter: Not implemented");
return E_NOTIMPL;
static bool s_errorShown = false;
if (!std::exchange(s_errorShown, true))
Logger::warn("DxgiFactory::EnumWarpAdapter: WARP not supported, returning first hardware adapter");
Com<IDXGIAdapter1> adapter;
HRESULT hr = EnumAdapters1(0, &adapter);
if (FAILED(hr))
return hr;
return adapter->QueryInterface(riid, ppvAdapter);
}