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:
Stenzek
2019-05-12 14:42:16 +10:00
parent 0177c6c2c7
commit 9316e25652
12 changed files with 80 additions and 57 deletions

View File

@ -12,7 +12,7 @@
#include "Common/CommonTypes.h"
#include "VideoCommon/VideoCommon.h"
struct IDXGIFactory2;
struct IDXGIFactory;
enum class AbstractTextureFormat : u32;
@ -26,7 +26,7 @@ void UnloadLibraries();
std::vector<std::string> GetAdapterNames();
// Helper function which creates a DXGI factory.
IDXGIFactory2* CreateDXGIFactory(bool debug_device);
IDXGIFactory* CreateDXGIFactory(bool debug_device);
// Globally-accessible D3DCompiler function.
extern pD3DCompile d3d_compile;