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)
|
if (paused)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// don't pause when linked
|
||||||
|
#ifndef NO_LINK
|
||||||
|
if (GetLinkMode() != LINK_DISCONNECTED)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
paused = was_paused = true;
|
paused = was_paused = true;
|
||||||
|
|
||||||
if (loaded != IMAGE_UNKNOWN)
|
if (loaded != IMAGE_UNKNOWN)
|
||||||
|
@ -1039,7 +1045,7 @@ void GameArea::OnIdle(wxIdleEvent& event)
|
||||||
w->Connect(wxEVT_SIZE, wxSizeEventHandler(GameArea::OnSize), NULL, this);
|
w->Connect(wxEVT_SIZE, wxSizeEventHandler(GameArea::OnSize), NULL, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!paused && (!pauseWhenInactive || wxGetApp().frame->HasFocus())) {
|
if (!paused) {
|
||||||
HidePointer();
|
HidePointer();
|
||||||
event.RequestMore();
|
event.RequestMore();
|
||||||
|
|
||||||
|
|
|
@ -871,8 +871,7 @@ void MainFrame::MenuPopped(wxMenuEvent& evt)
|
||||||
if (popped)
|
if (popped)
|
||||||
panel->ShowPointer();
|
panel->ShowPointer();
|
||||||
|
|
||||||
// don't pause on menu when link is active #83
|
if (menus_opened)
|
||||||
if (menus_opened && !gba_joybus_active)
|
|
||||||
panel->Pause();
|
panel->Pause();
|
||||||
else if (!IsPaused())
|
else if (!IsPaused())
|
||||||
panel->Resume();
|
panel->Resume();
|
||||||
|
|
Loading…
Reference in New Issue