]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix magic mouse without enabled mouse driver
authorToni Wilen <twilen@winuae.net>
Thu, 2 May 2024 17:16:54 +0000 (20:16 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 2 May 2024 17:16:54 +0000 (20:16 +0300)
od-win32/win32.cpp

index 33775bcf8418a25ea98455f428842c464241deae..af0c4b7287d041049b3039de65db4db8e66ebd6d 100644 (file)
@@ -1067,6 +1067,8 @@ static void setmouseactive2(struct AmigaMonitor *mon, int active, bool allowpaus
                        return;
        }
 
+       //write_log(_T("setmouseactive(%d)\n"), active);
+
        if (active < 0)
                active = 1;
 
@@ -1074,13 +1076,17 @@ static void setmouseactive2(struct AmigaMonitor *mon, int active, bool allowpaus
 
        mon->mouseposx = mon->mouseposy = 0;
 
-       if (isfullscreen () <= 0 && (currprefs.input_mouse_untrap & MOUSEUNTRAP_MAGIC) && currprefs.input_tablet > 0) {
-               if (mousehack_alive()) {
-                       releasecapture(mon);
+       if (isfullscreen() <= 0 && (currprefs.input_mouse_untrap & MOUSEUNTRAP_MAGIC)) {
+               if (currprefs.input_tablet > 0) {
+                       if (mousehack_alive()) {
+                               releasecapture(mon);
+                               recapture = 0;
+                               return;
+                       }
+                       SetCursor(normalcursor);
+               } else {
                        recapture = 0;
-                       return;
                }
-               SetCursor (normalcursor);
        }
 
        bool gotfocus = false;