/* Inspired by
http://msdn.microsoft.com/archive/en-us/dnargame/html/msdn_sidewind3d.asp
*/
-# if defined(_MSC_VER)
-# pragma comment (lib, "advapi32.lib") /* library pragmas are bad */
+# if FREEGLUT_LIB_PRAGMAS
+# pragma comment (lib, "advapi32.lib")
# endif
static int fghJoystickGetOEMProductName ( SFG_Joystick* joy, char *buf, int buf_sz )
static void fghJoystickOpen( SFG_Joystick* joy )
{
- int i;
+ int i = 0;
#if TARGET_HOST_MACINTOSH
OSStatus err;
#endif
unsigned char u;
# else
# if defined( __linux__ )
- int counter;
+ int counter = 0;
# endif
# endif
#endif
fgInitialiseJoysticks ();
- if ( !fgJoystick )
- return 0;
-
if ( !fgState.JoysticksInitialised )
return 0;