mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14: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) {
|
void** ppvAdapter) {
|
||||||
InitReturnPtr(ppvAdapter);
|
InitReturnPtr(ppvAdapter);
|
||||||
|
|
||||||
Logger::err("DxgiFactory::EnumWarpAdapter: Not implemented");
|
static bool s_errorShown = false;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
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