Merge pull request #1904 from magumagu/d3d-allow-nooutput-adapter

D3D: allow selecting adapters with no outputs.
This commit is contained in:
skidau 2015-02-04 13:09:27 +11:00
commit c18c50a0e1
1 changed files with 10 additions and 5 deletions

View File

@ -243,11 +243,16 @@ HRESULT Create(HWND wnd)
if (FAILED(hr)) if (FAILED(hr))
{ {
// try using the first one // try using the first one
hr = adapter->EnumOutputs(0, &output); IDXGIAdapter* firstadapter;
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate outputs!\n") hr = factory->EnumAdapters(0, &firstadapter);
_T("This usually happens when you've set your video adapter to the Nvidia GPU in an Optimus-equipped system.\n") if (!FAILED(hr))
_T("Set Dolphin to use the high-performance graphics in Nvidia's drivers instead and leave Dolphin's video adapter set to the Intel GPU."), hr = firstadapter->EnumOutputs(0, &output);
_T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR); if (FAILED(hr)) MessageBox(wnd,
_T("Failed to enumerate outputs!\n")
_T("This usually happens when you've set your video adapter to the Nvidia GPU in an Optimus-equipped system.\n")
_T("Set Dolphin to use the high-performance graphics in Nvidia's drivers instead and leave Dolphin's video adapter set to the Intel GPU."),
_T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
SAFE_RELEASE(firstadapter);
} }
// get supported AA modes // get supported AA modes