From: John F. Fay Date: Thu, 19 Mar 2009 14:55:14 +0000 (+0000) Subject: Fixing "freeglut_input_devices.c" for MSVS2005 and later per e-mail from Diederick... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=58bb36d8ead1fe98acd7db18850eb215df7052e9;p=freeglut Fixing "freeglut_input_devices.c" for MSVS2005 and later per e-mail from Diederick Niehorster dated Thu 3/19/2009 6:57 AM git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@805 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_input_devices.c b/src/freeglut_input_devices.c index 142ee4c..64f90b7 100755 --- a/src/freeglut_input_devices.c +++ b/src/freeglut_input_devices.c @@ -136,15 +136,16 @@ int fgInputDeviceDetect( void ) */ void fgInitialiseInputDevices ( void ) { - const char *dial_device=NULL; if( !fgState.InputDevsInitialised ) { #if TARGET_HOST_MS_WINDOWS && ( _MSC_VER >= 1400 ) // will return true for VC8 (VC2005) and higher + char *dial_device=NULL; size_t sLen; errno_t err = _dupenv_s( &dial_device, &sLen, "GLUT_DIALS_SERIAL" ); if (err) fgError("Error getting GLUT_DIALS_SERIAL environment variable"); #else + const char *dial_device=NULL; dial_device = getenv ( "GLUT_DIALS_SERIAL" ); #endif #if TARGET_HOST_MS_WINDOWS