First attempt at adding John Tsiombikas' spaceball support for X11. It compiles...
[freeglut] / src / freeglut_cursor.c
index f383b7a..0d48e99 100644 (file)
@@ -162,7 +162,7 @@ void fgSetCursor ( SFG_Window *window, int cursorID )
      * Joe Krahn is re-writing the following code.
      */
     /* Set the cursor AND change it for this window class. */
-#if _MSC_VER <= 1200
+#if !defined(__MINGW64__) && _MSC_VER <= 1200
 #       define MAP_CURSOR(a,b)                                   \
         case a:                                                  \
             SetCursor( LoadCursor( NULL, b ) );                  \
@@ -183,14 +183,14 @@ void fgSetCursor ( SFG_Window *window, int cursorID )
             SetCursor( LoadCursor( NULL, b ) );                  \
             SetClassLongPtr( window->Window.Handle,              \
                           GCLP_HCURSOR,                          \
-                          ( LONG )LoadCursor( NULL, b ) );       \
+                          ( LONG )( LONG_PTR )LoadCursor( NULL, b ) );       \
         break;
     /* Nuke the cursor AND change it for this window class. */
 #       define ZAP_CURSOR(a,b)                                   \
         case a:                                                  \
             SetCursor( NULL );                                   \
-            SetClassLong( window->Window.Handle,                 \
-                          GCLP_HCURSOR, ( LONG )NULL );          \
+            SetClassLongPtr( window->Window.Handle,              \
+                          GCLP_HCURSOR, ( LONG )( LONG_PTR )NULL );          \
         break;
 #endif