From 4501aeefbea7a83efc736b1fb604dc27c82c55d8 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Wed, 30 Jul 2014 12:03:09 +0200 Subject: [PATCH] CFrame: Check borderless fullscreen setting before enabling exclusive fullscreen in the video config. Fixes a bug where "Use Fullscreen" would initialize into exclusive fullscreen regardless of the borderless fullscreen setting. Also relieves the need for the video renderer to check the borderless fullscreen setting each time. --- Source/Core/DolphinWX/Frame.cpp | 3 ++- Source/Core/VideoBackends/D3D/Render.cpp | 2 +- Source/Core/VideoCommon/VideoConfig.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index e1ee904653..2f65d77284 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1244,7 +1244,8 @@ void CFrame::DoFullscreen(bool enable_fullscreen) m_RenderFrame->Raise(); } - g_Config.bFullscreen = enable_fullscreen; + g_Config.bFullscreen = (g_Config.bBorderlessFullscreen || + SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain) ? false : enable_fullscreen; } const CGameListCtrl *CFrame::GetGameListCtrl() const diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index 6b69c0a634..30b638d2b9 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -939,7 +939,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl SetWindowSize(fbWidth, fbHeight); const bool windowResized = CheckForResize(); - const bool fullscreen = g_ActiveConfig.ExclusiveFullscreenEnabled() && + const bool fullscreen = g_ActiveConfig.bFullscreen && !SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain; bool fullscreen_changed = s_last_fullscreen_mode != fullscreen; diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 2ff29bf87b..bf329d658c 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -152,7 +152,6 @@ struct VideoConfig final bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; } bool EFBCopiesToTextureEnabled() const { return bEFBCopyEnable && bCopyEFBToTexture; } bool EFBCopiesToRamEnabled() const { return bEFBCopyEnable && !bCopyEFBToTexture; } - bool ExclusiveFullscreenEnabled() const { return bFullscreen && !bBorderlessFullscreen; } }; extern VideoConfig g_Config;