diff options
| author | Jules Blok <jules.blok@gmail.com> | 2015-01-16 16:01:29 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2015-01-16 16:01:29 +0100 |
| commit | 803bea500450799ed8a3069ac680ece9bf661344 (patch) | |
| tree | a9d761aaebe52751dee9ff8b1160e25a7c1bba44 /Source/Core/VideoBackends/D3D/Render.cpp | |
| parent | c2bdcbe71c8e559a3bb91ff1da7844dd65406582 (diff) | |
D3D: Fix Dolphin immediately exiting exclusive fullscreen.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/Render.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index 1ae034bdda..b960504c2c 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -891,20 +891,10 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co // we can apply exclusive mode. fullscreen_changed = Host_RendererHasFocus(); } - else if (!fullscreen) + else if (!fullscreen && exclusive_mode) { - if (exclusive_mode) - { - // Exclusive fullscreen is disabled, but we're still in exclusive mode. - fullscreen_changed = true; - } - else if (!g_ActiveConfig.bBorderlessFullscreen && Host_RendererIsFullscreen()) - { - // Exclusive fullscreen is disabled and we are no longer in exclusive - // mode. Thus we can now safely notify the UI to exit fullscreen. But - // we should only do so if borderless fullscreen mode is disabled. - Host_RequestFullscreen(false); - } + // Exclusive fullscreen is disabled, but we're still in exclusive mode. + fullscreen_changed = true; } } @@ -924,8 +914,14 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co { // Apply fullscreen state if (fullscreen_changed) + { D3D::SetFullscreenState(fullscreen); + // If exclusive fullscreen is disabled we can safely notify the UI to exit fullscreen. + if (!fullscreen) + Host_RequestFullscreen(false); + } + // TODO: Aren't we still holding a reference to the back buffer right now? D3D::Reset(); SAFE_RELEASE(s_screenshot_texture); |
