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/DolphinWX/Frame.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/DolphinWX/Frame.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 4c258d5453..25a09d13e1 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -640,6 +640,11 @@ void CFrame::OnHostMessage(wxCommandEvent& event) } break; + case IDM_FULLSCREENREQUEST: + if (m_RenderFrame != nullptr) + m_RenderFrame->ShowFullScreen(event.GetInt() == 0 ? false : true); + break; + case WM_USER_CREATE: if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor) m_RenderParent->SetCursor(wxCURSOR_BLANK); @@ -1185,7 +1190,18 @@ void CFrame::DoFullscreen(bool bF) [window toggleFullScreen:nil]; } #else - m_RenderFrame->ShowFullScreen(bF, wxFULLSCREEN_ALL); + if (bF) + { + m_RenderFrame->ShowFullScreen(true, wxFULLSCREEN_ALL); + } + else if (!g_ActiveConfig.backend_info.bSupportsExclusiveFullscreen || + SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain || + g_ActiveConfig.bForceBorderlessFullscreen) + { + // Exiting exclusive fullscreen should be done from a Renderer callback. + // Therefore we don't exit fullscreen from here if we support exclusive mode. + m_RenderFrame->ShowFullScreen(false, wxFULLSCREEN_ALL); + } #endif if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain) |
