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:
Rafael Kitover 2020-08-31 07:25:38 +00:00
parent 9dd2932436
commit def5d3e486
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 2 additions and 0 deletions

View File

@ -329,6 +329,7 @@ void GameArea::LoadGame(const wxString& name)
emulating = true;
was_paused = true;
MainFrame* mf = wxGetApp().frame;
mf->StopJoyPollTimer();
mf->SetJoystick();
mf->cmd_enable &= ~(CMDEN_GB | CMDEN_GBA);
mf->cmd_enable |= ONLOAD_CMDEN;
@ -579,6 +580,7 @@ void GameArea::UnloadGame(bool destruct)
mf->cmd_enable &= UNLOAD_CMDEN_KEEP;
mf->update_state_ts(true);
mf->enable_menus();
mf->StartJoyPollTimer();
mf->SetJoystick();
mf->ResetCheatSearch();