Stop timer when game is loaded again.
Followup on 7031c1d1
, which for some reason removed the calls to stop
the timer when a game is loaded and restart it when it is unloaded.
Add the calls back.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
9dd2932436
commit
def5d3e486
|
@ -329,6 +329,7 @@ void GameArea::LoadGame(const wxString& name)
|
||||||
emulating = true;
|
emulating = true;
|
||||||
was_paused = true;
|
was_paused = true;
|
||||||
MainFrame* mf = wxGetApp().frame;
|
MainFrame* mf = wxGetApp().frame;
|
||||||
|
mf->StopJoyPollTimer();
|
||||||
mf->SetJoystick();
|
mf->SetJoystick();
|
||||||
mf->cmd_enable &= ~(CMDEN_GB | CMDEN_GBA);
|
mf->cmd_enable &= ~(CMDEN_GB | CMDEN_GBA);
|
||||||
mf->cmd_enable |= ONLOAD_CMDEN;
|
mf->cmd_enable |= ONLOAD_CMDEN;
|
||||||
|
@ -579,6 +580,7 @@ void GameArea::UnloadGame(bool destruct)
|
||||||
mf->cmd_enable &= UNLOAD_CMDEN_KEEP;
|
mf->cmd_enable &= UNLOAD_CMDEN_KEEP;
|
||||||
mf->update_state_ts(true);
|
mf->update_state_ts(true);
|
||||||
mf->enable_menus();
|
mf->enable_menus();
|
||||||
|
mf->StartJoyPollTimer();
|
||||||
mf->SetJoystick();
|
mf->SetJoystick();
|
||||||
mf->ResetCheatSearch();
|
mf->ResetCheatSearch();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue