From: Toni Wilen Date: Sun, 9 Jul 2023 17:32:33 +0000 (+0300) Subject: Do not check mousehack state if emulation is going to exit X-Git-Tag: 5.1.0~158 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=69c39347dd9478f3dba03b4a6810fccd99141235;p=francis%2Fwinuae.git Do not check mousehack state if emulation is going to exit --- diff --git a/inputdevice.cpp b/inputdevice.cpp index deec09b1..3051be37 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -3178,12 +3178,15 @@ static void mousehack_helper (uae_u32 buttonmask) int x, y; //write_log (_T("mousehack_helper %08X\n"), buttonmask); - if (!(currprefs.input_mouse_untrap & MOUSEUNTRAP_MAGIC) && currprefs.input_tablet < TABLET_MOUSEHACK) + if (quit_program) { return; + } + if (!(currprefs.input_mouse_untrap & MOUSEUNTRAP_MAGIC) && currprefs.input_tablet < TABLET_MOUSEHACK) { + return; + } get_mouse_position(&x, &y, lastmx, lastmy); - - inputdevice_mh_abs (x, y, buttonmask); + inputdevice_mh_abs(x, y, buttonmask); } static int mouseedge_x, mouseedge_y, mouseedge_time;