UI: Prevent crash when closing window if mouse hide timer occurs after releasing the emulation core.
This commit is contained in:
parent
b8422ca956
commit
d7a850b59e
2 changed files with 7 additions and 0 deletions
|
@ -29,6 +29,12 @@ namespace Mesen.GUI
|
|||
_tmrCheckMouseMove.Start();
|
||||
}
|
||||
|
||||
public static void StopTimers()
|
||||
{
|
||||
_tmrCheckMouseMove.Stop();
|
||||
_tmrHideMouse.Stop();
|
||||
}
|
||||
|
||||
private static void tmrCheckMouseMove_Tick(object sender, EventArgs e)
|
||||
{
|
||||
//Rarely the cursor becomes hidden despite leaving the window or moving
|
||||
|
|
|
@ -317,6 +317,7 @@ namespace Mesen.GUI.Forms
|
|||
}
|
||||
|
||||
_shuttingDown = true;
|
||||
CursorManager.StopTimers();
|
||||
BaseForm.StopBackgroundTimer();
|
||||
_logWindow?.Close();
|
||||
_historyViewerWindow?.Close();
|
||||
|
|
Loading…
Add table
Reference in a new issue