]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not check mousehack state if emulation is going to exit
authorToni Wilen <twilen@winuae.net>
Sun, 9 Jul 2023 17:32:33 +0000 (20:32 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 9 Jul 2023 17:32:33 +0000 (20:32 +0300)
inputdevice.cpp

index deec09b1f50fafdc27ab14340e33ff548379c707..3051be37b38a23106c188f727d5ffa03ccdff076 100644 (file)
@@ -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;