X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_main.c;h=3e6ad68ae801ffbb56d7034ec3664681aa93452d;hb=3c7c46e5846a39dde8be85c131e69cab1d8cb1ec;hp=1c308dfc55d6259d43ddda831325641f354afc93;hpb=5510bc295094794b4804bb97db4bb58ebba3c5b0;p=freeglut diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 1c308df..3e6ad68 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -27,13 +27,13 @@ #include #include "freeglut_internal.h" -#if HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H # include #endif #include -#if HAVE_VPRINTF +#ifdef HAVE_VFPRINTF # define VFPRINTF(s,f,a) vfprintf((s),(f),(a)) -#elif HAVE_DOPRNT +#elif defined(HAVE__DOPRNT) # define VFPRINTF(s,f,a) _doprnt((f),(a),(s)) #else # define VFPRINTF(s,f,a) @@ -59,7 +59,7 @@ struct GXKeyList gxKeyList; * Try to get the maximum value allowed for ints, falling back to the minimum * guaranteed by ISO C99 if there is no suitable header. */ -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H # include #endif #ifndef INT_MAX @@ -473,7 +473,7 @@ static void fghSleepForEvents( void ) wait.tv_usec = (msec % 1000) * 1000; err = select( socket+1, &fdset, NULL, NULL, &wait ); -#if HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H if( ( -1 == err ) && ( errno != EINTR ) ) fgWarning ( "freeglut select() error: %d", errno ); #endif @@ -1387,6 +1387,13 @@ void FGAPIENTRY glutMainLoopEvent( void ) case XK_Num_Lock : special = GLUT_KEY_NUM_LOCK; break; case XK_KP_Begin : special = GLUT_KEY_BEGIN; break; case XK_KP_Delete: special = GLUT_KEY_DELETE; break; + + case XK_Shift_L: special = GLUT_KEY_SHIFT_L; break; + case XK_Shift_R: special = GLUT_KEY_SHIFT_R; break; + case XK_Control_L: special = GLUT_KEY_CTRL_L; break; + case XK_Control_R: special = GLUT_KEY_CTRL_R; break; + case XK_Alt_L: special = GLUT_KEY_ALT_L; break; + case XK_Alt_R: special = GLUT_KEY_ALT_R; break; } /*