mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #1231 from Armada651/borderless
Support the borderless fullscreen option in all backends.
This commit is contained in:
@ -187,19 +187,23 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
|
||||
|
||||
bool CRenderFrame::ShowFullScreen(bool show, long style)
|
||||
{
|
||||
if (show)
|
||||
#if defined WIN32
|
||||
if (show && !g_Config.bBorderlessFullscreen)
|
||||
{
|
||||
// OpenGL requires the pop-up style to activate exclusive mode.
|
||||
SetWindowStyle((GetWindowStyle() & ~wxDEFAULT_FRAME_STYLE) | wxPOPUP_WINDOW);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool result = wxTopLevelWindow::ShowFullScreen(show, style);
|
||||
|
||||
#if defined WIN32
|
||||
if (!show)
|
||||
{
|
||||
// Restore the default style.
|
||||
SetWindowStyle((GetWindowStyle() & ~wxPOPUP_WINDOW) | wxDEFAULT_FRAME_STYLE);
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -1256,7 +1260,7 @@ void CFrame::OnMouse(wxMouseEvent& event)
|
||||
|
||||
void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||
{
|
||||
if (!g_Config.BorderlessFullscreenEnabled() &&
|
||||
if (g_Config.ExclusiveFullscreenEnabled() &&
|
||||
!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
|
||||
Core::GetState() == Core::CORE_PAUSE)
|
||||
{
|
||||
@ -1283,7 +1287,7 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||
{
|
||||
m_RenderFrame->ShowFullScreen(true, wxFULLSCREEN_ALL);
|
||||
}
|
||||
else if (g_Config.BorderlessFullscreenEnabled() ||
|
||||
else if (!g_Config.ExclusiveFullscreenEnabled() ||
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
{
|
||||
// Exiting exclusive fullscreen should be done from a Renderer callback.
|
||||
@ -1340,7 +1344,7 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||
m_RenderFrame->Raise();
|
||||
}
|
||||
|
||||
g_Config.bFullscreen = (g_Config.BorderlessFullscreenEnabled() ||
|
||||
g_Config.bFullscreen = (!g_Config.ExclusiveFullscreenEnabled() ||
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain) ? false : enable_fullscreen;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user