From 9064bf147d3a805e82f386aca9becc7f32b51ef8 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Fri, 11 Jul 2014 15:26:38 +0200 Subject: [PATCH] D3D: Don't set the windowed mode size when we initialize in fullscreen. --- Source/Core/VideoBackends/D3D/D3DBase.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index 718ed9eec8..1d03e9b33b 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -279,10 +279,13 @@ HRESULT Create(HWND wnd) hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, nullptr); if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR); - // forcing buffer resolution to xres and yres.. - // this is not a problem as long as we're in windowed mode - swap_chain_desc.BufferDesc.Width = xres; - swap_chain_desc.BufferDesc.Height = yres; + if (swap_chain_desc.Windowed) + { + // forcing buffer resolution to xres and yres.. + // this is not a problem as long as we're in windowed mode + swap_chain_desc.BufferDesc.Width = xres; + swap_chain_desc.BufferDesc.Height = yres; + } #if defined(_DEBUG) || defined(DEBUGFAST) // Creating debug devices can sometimes fail if the user doesn't have the correct