2
0
Эх сурвалжийг харах

Added use of standard lParam macros.

Camilla Berglund 13 жил өмнө
parent
commit
4408d2134c
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      src/win32_window.c

+ 3 - 2
src/win32_window.c

@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <malloc.h>
+#include <windowsx.h>
 
 //========================================================================
 // Hide mouse cursor
@@ -559,8 +560,8 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
             int newCursorX, newCursorY;
 
             // Get signed (!) cursor position
-            newCursorX = (int)((short)LOWORD(lParam));
-            newCursorY = (int)((short)HIWORD(lParam));
+            newCursorX = GET_X_LPARAM(lParam);
+            newCursorY = GET_Y_LPARAM(lParam);
 
             if (newCursorX != window->Win32.oldCursorX ||
                 newCursorY != window->Win32.oldCursorY)