From c323b386ae8bff134c058985261fc56acbaabef7 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Tue, 17 Jun 2014 11:15:56 +0200 Subject: [PATCH] Prevent DXGI from making changes to the window. Prevents DXGI from responding to Alt+Enter and messing up our fullscreen handling. --- Source/Core/VideoBackends/D3D/D3DBase.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp index e5e1ae2a83..eac3e7ac59 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.cpp +++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp @@ -308,6 +308,10 @@ HRESULT Create(HWND wnd) SAFE_RELEASE(swapchain); return E_FAIL; } + + hr = factory->MakeWindowAssociation(wnd, DXGI_MWA_NO_WINDOW_CHANGES); + if (FAILED(hr)) MessageBox(wnd, _T("Failed to associate the window"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR); + SetDebugObjectName((ID3D11DeviceChild*)context, "device context"); SAFE_RELEASE(factory); SAFE_RELEASE(output);