mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxgi] Add fake implementation of DxgiFactory::EnumWarpAdapter
Apparently FIFA 19 needs this.
This commit is contained in:
parent
945a64252d
commit
fc91fe1d34
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user