From 9795b4c0c5f8e8c635ac3d7e57b9581bfe89880e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Thu, 2 May 2024 20:16:54 +0300 Subject: [PATCH] Fix magic mouse without enabled mouse driver --- od-win32/win32.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 33775bcf..af0c4b72 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -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; -- 2.47.3