From 36ea1890c8d1b6084a5bc2e80093878af400810a Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Wed, 16 Jul 2014 15:53:33 +0200 Subject: Let the Renderer decide when to exit fullscreen. This ensures the transition from/to exclusive mode happens while the RenderFrame is fullscreen. This prevents fullscreen loops and relieves us of having to restore the window size after we exit fullscreen. --- Source/Core/VideoBackends/D3D/Render.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/D3D/Render.cpp') diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index a7b2c56212..ae23516d5c 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -975,11 +975,18 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl s_LastAA != g_ActiveConfig.iMultisampleMode) { s_LastAA = g_ActiveConfig.iMultisampleMode; - s_last_fullscreen_mode = fullscreen; PixelShaderCache::InvalidateMSAAShaders(); if (windowResized || fullscreen_changed) { + // apply fullscreen state + if (fullscreen_changed) + { + s_last_fullscreen_mode = fullscreen; + D3D::swapchain->SetFullscreenState(fullscreen, nullptr); + Host_RequestFullscreen(fullscreen); + } + // TODO: Aren't we still holding a reference to the back buffer right now? D3D::Reset(); SAFE_RELEASE(s_screenshot_texture); -- cgit v1.2.3