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
This commit is contained in:
parent
3cf6a9e014
commit
6c88f9e652
|
@ -660,10 +660,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||||
// Toggle fullscreen
|
// Toggle fullscreen
|
||||||
if (event.GetKeyCode() == WXK_ESCAPE || (event.GetKeyCode() == WXK_RETURN && event.GetModifiers() == wxMOD_ALT))
|
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
|
DoFullscreen(!IsFullScreen());
|
||||||
// the main window to become unresponsive, so we have to avoid that.
|
|
||||||
if ((bRenderToMain || Core::GetState() != Core::CORE_RUN) && !m_bModalDialogOpen)
|
|
||||||
DoFullscreen(!IsFullScreen());
|
|
||||||
|
|
||||||
// We do that to avoid the event to be double processed (which would cause the window to be stuck in fullscreen)
|
// We do that to avoid the event to be double processed (which would cause the window to be stuck in fullscreen)
|
||||||
event.StopPropagation();
|
event.StopPropagation();
|
||||||
|
@ -835,8 +832,10 @@ wxAuiNotebook* CFrame::CreateEmptyNotebook()
|
||||||
|
|
||||||
void CFrame::DoFullscreen(bool bF)
|
void CFrame::DoFullscreen(bool bF)
|
||||||
{
|
{
|
||||||
// Only switch this to fullscreen if we're rendering to main OR if we're not running a game
|
// Only switch this to fullscreen if we're rendering to main AND if we're running a game
|
||||||
if (bRenderToMain || Core::GetState() != Core::CORE_RUN)
|
// 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);
|
ShowFullScreen(bF);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue