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.
This commit is contained in:
Jules Blok
2014-07-16 15:53:33 +02:00
parent cd94ff1966
commit 36ea1890c8
8 changed files with 40 additions and 5 deletions

View File

@ -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);