From edf4276841489910e94e8757aa2876e34b0536ef Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 7 Jan 2024 16:15:53 +0200 Subject: [PATCH] Do not force key release if mouse capture was requested but mouse was already captured. --- od-win32/win32.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 0b8e3ce9..d5caf058 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -1027,6 +1027,7 @@ static void setmouseactive2(struct AmigaMonitor *mon, int active, bool allowpaus #else bool isrp = false; #endif + int lastmouseactive = mouseactive; //write_log (_T("setmouseactive %d->%d cursor=%d focus=%d recap=%d\n"), mouseactive, active, mon_cursorclipped, focus, recapture); @@ -1103,7 +1104,9 @@ static void setmouseactive2(struct AmigaMonitor *mon, int active, bool allowpaus } setcursor(mon, -30000, -30000); } - wait_keyrelease(); + if (lastmouseactive != mouseactive) { + wait_keyrelease(); + } inputdevice_acquire(TRUE); setpriority (&priorities[currprefs.win32_active_capture_priority]); if (currprefs.win32_active_nocapture_pause) { -- 2.47.3