diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-07-16 15:53:33 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-07-21 17:11:13 +0200 |
| commit | 36ea1890c8d1b6084a5bc2e80093878af400810a (patch) | |
| tree | 592aa6253df915b4f1f24caed029bbbefde08c71 /Source/Core/VideoBackends/D3D/Render.cpp | |
| parent | cd94ff19663ad1d0bb65395d8b822b56d3603863 (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/Render.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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); |
