From 0f13c61daae9a5f532db82d28b6be7b511e1f39d Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Mon, 10 Jul 2017 01:24:43 +0200 Subject: [PATCH] D3DBase: Only create a stereo swapchain when needed. --- Source/Core/VideoBackends/D3D/D3DBase.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index 36c09b4694..730a722e5d 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -304,9 +304,10 @@ HRESULT Create(HWND wnd) swap_chain_desc.Width = xres; swap_chain_desc.Height = yres; - // By always creating a stereo swapchain we can toggle Quad-Buffered stereoscopy + // By creating a stereo swapchain early we can toggle Quad-Buffered stereoscopy // while the game is running. - swap_chain_desc.Stereo = TRUE; + swap_chain_desc.Stereo = + g_ActiveConfig.iStereoMode == STEREO_QUADBUFFER || factory->IsWindowedStereoEnabled(); #if defined(_DEBUG) || defined(DEBUGFAST) // Creating debug devices can sometimes fail if the user doesn't have the correct @@ -352,9 +353,8 @@ HRESULT Create(HWND wnd) &swapchain); if (FAILED(hr)) { - // Some swapchain features aren't supported on Windows 7, so here we fall back to legacy - // swapchain features - swap_chain_desc.Stereo = FALSE; + // Flip-model swapchains aren't supported on Windows 7, so here we fall back to a legacy + // BitBlt-model swapchain swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL; hr = factory->CreateSwapChainForHwnd(device, hWnd, &swap_chain_desc, nullptr, nullptr, &swapchain);