mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
D3DCommon: Fallback to base CreateSwapChain on failure
It appears that some older drivers do not support CreateSwapChainForHwnd, resulting in DXGI_ERROR_INVALID_CALL. For these cases, fall back to the base CreateSwapChain() from DXGI 1.0. In theory this should also let us run on Win7 without the platform update, but in reality we require the newer shader compiler so this probably won't work regardless. Also any hardware of this vintage is unlikely to run Dolphin well.
This commit is contained in:
parent
0177c6c2c7
commit
9316e25652
12 changed files with 80 additions and 57 deletions
|
@ -43,7 +43,7 @@ std::vector<u32> DXContext::GetAAModes(u32 adapter_index)
|
|||
ComPtr<ID3D12Device> temp_device = g_dx_context ? g_dx_context->m_device : nullptr;
|
||||
if (!temp_device)
|
||||
{
|
||||
ComPtr<IDXGIFactory2> temp_dxgi_factory = D3DCommon::CreateDXGIFactory(false);
|
||||
ComPtr<IDXGIFactory> temp_dxgi_factory = D3DCommon::CreateDXGIFactory(false);
|
||||
if (!temp_dxgi_factory)
|
||||
return {};
|
||||
|
||||
|
@ -57,7 +57,8 @@ std::vector<u32> DXContext::GetAAModes(u32 adapter_index)
|
|||
return {};
|
||||
}
|
||||
|
||||
HRESULT hr = d3d12_create_device(nullptr, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&temp_device));
|
||||
HRESULT hr =
|
||||
d3d12_create_device(adapter.Get(), D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&temp_device));
|
||||
if (!SUCCEEDED(hr))
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue