X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_joystick.c;h=1c0e3214cd7fde336c6e1cc78cb5f355867ad7e0;hb=dd6c1d0a828e629798bed459c2e020abe8c1dab9;hp=a47d4910e4d40482a7f462e916ec03dd12a79b8b;hpb=646676b8dbf8ab504ac8a275fe9a63a403a3190b;p=freeglut diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index a47d491..1c0e321 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -57,7 +57,7 @@ # include # include # ifdef __FreeBSD__ -# include +# include # define JS_DATA_TYPE joystick # define JS_RETURN (sizeof(struct JS_DATA_TYPE)) # elif defined(__linux__) @@ -247,7 +247,7 @@ static void fghJoystickRawRead ( SFG_Joystick* joy, int* buttons, float* axes ) if( status != JS_RETURN ) { - g_warning( joy->fname ); + fgWarning( "%s", joy->fname ); joy->error = TRUE; return; } @@ -413,7 +413,7 @@ static void fghJoystickOpen( SFG_Joystick* joy ) if( joy->error ) return ; - sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), joy->id ); + sprintf( joyfname, "%s/.joy%drc", getenv( "HOME" ), joy->id ); joyfile = fopen( joyfname, "r" ); joy->error = (joyfile == NULL); @@ -501,7 +501,7 @@ void fgJoystickInit( int ident ) /* * Have the global joystick structure created */ - fgJoystick = calloc( sizeof(SFG_Joystick), 1 ); + fgJoystick = (SFG_Joystick *)calloc( sizeof(SFG_Joystick), 1 ); #ifdef WIN32 switch( ident )