diff options
| author | skidau <skidau@gmail.com> | 2015-02-04 13:09:27 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-02-04 13:09:27 +1100 |
| commit | c18c50a0e103db76da1834855efd4e136953afe7 (patch) | |
| tree | ef7295c6b7ffbd223d052e90d7e57d02e2e000ac /Source | |
| parent | b2df8cb87fd9675c72ca2b7693fc8454898bdade (diff) | |
| parent | 7d5abb4eb49fc26e533e1b6b7febc1fd42c31e66 (diff) | |
Merge pull request #1904 from magumagu/d3d-allow-nooutput-adapter
D3D: allow selecting adapters with no outputs.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DBase.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index 982c5d2e6c..62ce37da76 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -243,11 +243,16 @@ HRESULT Create(HWND wnd) if (FAILED(hr)) { // try using the first one - hr = adapter->EnumOutputs(0, &output); - 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); + IDXGIAdapter* firstadapter; + hr = factory->EnumAdapters(0, &firstadapter); + if (!FAILED(hr)) + hr = firstadapter->EnumOutputs(0, &output); + 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 |
