From 6ad443cfb19d799969f8c30c45dea424a443bad2 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 30 Aug 2024 16:02:32 +0200 Subject: [PATCH] uncomment ReleaseCapture call to prevent cursor issues in windowed mode --- src/dd.c | 5 +---- src/mouse.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dd.c b/src/dd.c index a4a3e3a..7887f07 100644 --- a/src/dd.c +++ b/src/dd.c @@ -1378,10 +1378,7 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags) if (!g_config.devmode) { - HCURSOR cursor = real_SetCursor(LoadCursor(NULL, IDC_ARROW)); - - if (cursor != LoadCursor(NULL, IDC_WAIT)) - InterlockedExchange((LONG*)&g_ddraw.old_cursor, (LONG)cursor); + InterlockedExchange((LONG*)&g_ddraw.old_cursor, (LONG)real_SetCursor(LoadCursor(NULL, IDC_ARROW))); } int cursor_count = real_ShowCursor(TRUE) - 1; diff --git a/src/mouse.c b/src/mouse.c index c5b25eb..46aca13 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -63,7 +63,7 @@ void mouse_unlock() g_mouse_locked = FALSE; real_ClipCursor(NULL); - //ReleaseCapture(); + ReleaseCapture(); RECT rc = { 0 }; real_GetClientRect(g_ddraw.hwnd, &rc);