Skip to content

Commit 7e8925f

Browse files
author
GH Action
committed
1 parent 9b31549 commit 7e8925f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/sokol/c/sokol_app.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -7575,10 +7575,11 @@ _SOKOL_PRIVATE LRESULT CALLBACK _sapp_win32_wndproc(HWND hWnd, UINT uMsg, WPARAM
75757575
see: https://gamedev.net/forums/topic/672094-keeping-things-moving-during-win32-moveresize-events/5254386/
75767576
*/
75777577
if (SendMessage(_sapp.win32.hwnd, WM_NCHITTEST, wParam, lParam) == HTCAPTION) {
7578-
POINT point;
7579-
GetCursorPos(&point);
7580-
ScreenToClient(_sapp.win32.hwnd, &point);
7581-
PostMessage(_sapp.win32.hwnd, WM_MOUSEMOVE, 0, ((uint32_t)point.x)|(((uint32_t)point.y) << 16));
7578+
POINT point = { 0, 0 };
7579+
if (GetCursorPos(&point)) {
7580+
ScreenToClient(_sapp.win32.hwnd, &point);
7581+
PostMessage(_sapp.win32.hwnd, WM_MOUSEMOVE, 0, ((uint32_t)point.x)|(((uint32_t)point.y) << 16));
7582+
}
75827583
}
75837584
break;
75847585
case WM_DROPFILES:

0 commit comments

Comments
 (0)