From 4857e89ca8063320af749fc0a6e5b9aa07b7271a Mon Sep 17 00:00:00 2001 From: rextimmy Date: Fri, 23 Dec 2016 15:43:45 +1000 Subject: [PATCH] D3D11 fullscreen fix --- Engine/source/gfx/D3D11/gfxD3D11Device.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp index bc162437b..1fbe28a52 100644 --- a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp +++ b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp @@ -427,6 +427,8 @@ void GFXD3D11Device::enumerateVideoModes() void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window) { AssertFatal(window, "GFXD3D11Device::init - must specify a window!"); + HWND hwnd = (HWND)window->getSystemWindow(PlatformWindow::WindowSystem_Windows); + SetFocus(hwnd);//ensure window has focus UINT createDeviceFlags = D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_BGRA_SUPPORT; #ifdef TORQUE_DEBUG