diff --git a/examples/example_sdl2_directx11/main.cpp b/examples/example_sdl2_directx11/main.cpp index 7a1ab9ec3..0e4540ef8 100644 --- a/examples/example_sdl2_directx11/main.cpp +++ b/examples/example_sdl2_directx11/main.cpp @@ -261,8 +261,10 @@ bool CreateDeviceD3D(HWND hWnd) // - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates. IDXGIFactory* pSwapChainFactory; if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory)))) + { pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER); - pSwapChainFactory->Release(); + pSwapChainFactory->Release(); + } CreateRenderTarget(); return true;