# include <unistd.h>
# include <fcntl.h>
# ifdef __FreeBSD__
-# include <machine/joystick.h>
+# include <sys/joystick.h>
# define JS_DATA_TYPE joystick
# define JS_RETURN (sizeof(struct JS_DATA_TYPE))
# elif defined(__linux__)
if( status != JS_RETURN )
{
- g_warning( joy->fname );
+ fgWarning( "%s", joy->fname );
joy->error = TRUE;
return;
}
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);
/*
* Have the global joystick structure created
*/
- fgJoystick = calloc( sizeof(SFG_Joystick), 1 );
+ fgJoystick = (SFG_Joystick *)calloc( sizeof(SFG_Joystick), 1 );
#ifdef WIN32
switch( ident )