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.
This commit is contained in:
Jules Blok 2014-07-30 12:03:09 +02:00
parent 96cfbd1bb0
commit 4501aeefbe
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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