From def5d3e486fcbcb7b74174b7356a6b47039428af Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Mon, 31 Aug 2020 07:25:38 +0000 Subject: [PATCH] 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 --- src/wx/panel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 0d7819d6..033de105 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -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();