From 69c39347dd9478f3dba03b4a6810fccd99141235 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 9 Jul 2023 20:32:33 +0300 Subject: [PATCH] Do not check mousehack state if emulation is going to exit --- inputdevice.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; -- 2.47.3