X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_cursor.c;h=93b6b2056c55f1b4595091e74aa30ad34ffd3d17;hb=e9ebb8053106d2504605c70a1fd777a52f1d9da4;hp=557a9b8b8605597ab62a43cb4e33096c5e9b6033;hpb=7fdce1253e14170b6cb933f13c1f2a1644c93793;p=freeglut diff --git a/src/freeglut_cursor.c b/src/freeglut_cursor.c index 557a9b8..93b6b20 100644 --- a/src/freeglut_cursor.c +++ b/src/freeglut_cursor.c @@ -159,9 +159,10 @@ void fgSetCursor ( SFG_Window *window, int cursorID ) #elif TARGET_HOST_MS_WINDOWS /* - * This is a temporary solution only... + * Joe Krahn is re-writing the following code. */ /* Set the cursor AND change it for this window class. */ +#if _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 ) {