partial fix for disabling pausing when linked #83
Check if link mode is active in GameArea::Pause() and refuse to pause if it is. Remove the check for the app not having focus with pauseWhenInactive enabled in GameArea::OnIdle() as this is now handled in MainFrame::OnActivate() (which receives focus events) sincef10e2e99
. Revert13f5afa9
which tried to check for link status in MainFrame::MenuPopped() because it was completely wrong and the link check is better done in GameArea::Pause().
This commit is contained in:
parent
d1918c12f4
commit
88d15c6ec8
|
@ -922,6 +922,12 @@ void GameArea::Pause()
|
|||
if (paused)
|
||||
return;
|
||||
|
||||
// don't pause when linked
|
||||
#ifndef NO_LINK
|
||||
if (GetLinkMode() != LINK_DISCONNECTED)
|
||||
return;
|
||||
#endif
|
||||
|
||||
paused = was_paused = true;
|
||||
|
||||
if (loaded != IMAGE_UNKNOWN)
|
||||
|
@ -1039,7 +1045,7 @@ void GameArea::OnIdle(wxIdleEvent& event)
|
|||
w->Connect(wxEVT_SIZE, wxSizeEventHandler(GameArea::OnSize), NULL, this);
|
||||
}
|
||||
|
||||
if (!paused && (!pauseWhenInactive || wxGetApp().frame->HasFocus())) {
|
||||
if (!paused) {
|
||||
HidePointer();
|
||||
event.RequestMore();
|
||||
|
||||
|
|
|
@ -871,8 +871,7 @@ void MainFrame::MenuPopped(wxMenuEvent& evt)
|
|||
if (popped)
|
||||
panel->ShowPointer();
|
||||
|
||||
// don't pause on menu when link is active #83
|
||||
if (menus_opened && !gba_joybus_active)
|
||||
if (menus_opened)
|
||||
panel->Pause();
|
||||
else if (!IsPaused())
|
||||
panel->Resume();
|
||||
|
|
Loading…
Reference in New Issue