X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_cursor.c;h=0d48e9941eb78000c843adfbf0dc2ad957c21642;hb=24fcc4c83143dfcfc68b0c4a20f32cdf706be834;hp=390e0cbf81b7c4b27b691392a9def619ca81a89c;hpb=7e602bb05f81d90be2dcc66f353bed554ba90c03;p=freeglut diff --git a/src/freeglut_cursor.c b/src/freeglut_cursor.c index 390e0cb..0d48e99 100644 --- a/src/freeglut_cursor.c +++ b/src/freeglut_cursor.c @@ -162,6 +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 !defined(__MINGW64__) && _MSC_VER <= 1200 # define MAP_CURSOR(a,b) \ case a: \ SetCursor( LoadCursor( NULL, b ) ); \ @@ -169,7 +170,6 @@ void fgSetCursor ( SFG_Window *window, int cursorID ) GCL_HCURSOR, \ ( LONG )LoadCursor( NULL, b ) ); \ break; - /* Nuke the cursor AND change it for this window class. */ # define ZAP_CURSOR(a,b) \ case a: \ @@ -177,6 +177,22 @@ void fgSetCursor ( SFG_Window *window, int cursorID ) SetClassLong( window->Window.Handle, \ GCL_HCURSOR, ( LONG )NULL ); \ break; +#else +# define MAP_CURSOR(a,b) \ + case a: \ + SetCursor( LoadCursor( NULL, b ) ); \ + SetClassLongPtr( window->Window.Handle, \ + GCLP_HCURSOR, \ + ( 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 ); \ + SetClassLongPtr( window->Window.Handle, \ + GCLP_HCURSOR, ( LONG )( LONG_PTR )NULL ); \ + break; +#endif switch( cursorID ) {