From eb9099e7dea62fb05debfbcdca9006d5316c8490 Mon Sep 17 00:00:00 2001 From: GH Action Date: Fri, 15 Nov 2024 16:48:31 +0000 Subject: [PATCH] updated (https://github.com/floooh/sokol/commit/a5329cf1ca56408687c7771772846b0c38094ac4) --- src/sokol/c/sokol_app.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sokol/c/sokol_app.h b/src/sokol/c/sokol_app.h index 1346c3b..54b0973 100644 --- a/src/sokol/c/sokol_app.h +++ b/src/sokol/c/sokol_app.h @@ -7575,10 +7575,11 @@ _SOKOL_PRIVATE LRESULT CALLBACK _sapp_win32_wndproc(HWND hWnd, UINT uMsg, WPARAM see: https://gamedev.net/forums/topic/672094-keeping-things-moving-during-win32-moveresize-events/5254386/ */ if (SendMessage(_sapp.win32.hwnd, WM_NCHITTEST, wParam, lParam) == HTCAPTION) { - POINT point; - GetCursorPos(&point); - ScreenToClient(_sapp.win32.hwnd, &point); - PostMessage(_sapp.win32.hwnd, WM_MOUSEMOVE, 0, ((uint32_t)point.x)|(((uint32_t)point.y) << 16)); + POINT point = { 0, 0 }; + if (GetCursorPos(&point)) { + ScreenToClient(_sapp.win32.hwnd, &point); + PostMessage(_sapp.win32.hwnd, WM_MOUSEMOVE, 0, ((uint32_t)point.x)|(((uint32_t)point.y) << 16)); + } } break; case WM_DROPFILES: