From 6c88f9e652ed5ba285faf7f778c8f9bfa7ce1c2e Mon Sep 17 00:00:00 2001 From: luisr142004 Date: Sun, 8 Nov 2009 09:13:42 +0000 Subject: [PATCH] disable the full screen button while no game has been loaded and move a change from rev 4492 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4517 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/Frame.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 30ac2cd4d3..683c58baef 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -660,10 +660,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event) // Toggle fullscreen if (event.GetKeyCode() == WXK_ESCAPE || (event.GetKeyCode() == WXK_RETURN && event.GetModifiers() == wxMOD_ALT)) { - // If a modal dialog is open, this will still process the keyboard events, and may cause - // the main window to become unresponsive, so we have to avoid that. - if ((bRenderToMain || Core::GetState() != Core::CORE_RUN) && !m_bModalDialogOpen) - DoFullscreen(!IsFullScreen()); + DoFullscreen(!IsFullScreen()); // We do that to avoid the event to be double processed (which would cause the window to be stuck in fullscreen) event.StopPropagation(); @@ -835,8 +832,10 @@ wxAuiNotebook* CFrame::CreateEmptyNotebook() void CFrame::DoFullscreen(bool bF) { - // Only switch this to fullscreen if we're rendering to main OR if we're not running a game - if (bRenderToMain || Core::GetState() != Core::CORE_RUN) + // Only switch this to fullscreen if we're rendering to main AND if we're running a game + // plus if a modal dialog is open, this will still process the keyboard events, and may cause + // the main window to become unresponsive, so we have to avoid that. + if ((bRenderToMain && Core::GetState() == Core::CORE_RUN) && !m_bModalDialogOpen) { ShowFullScreen(bF);