X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_joystick.c;h=6f6771cf24a845fe840a081a421c50aae30ba02f;hb=b304f6f9002f17cc263e06641a92f19ffbfaf062;hp=ab6f401f3a834189b973be37d62e274a439bcba7;hpb=1b5ee849ba61b667aeba474a7e03406196478bee;p=freeglut diff --git a/src/fg_joystick.c b/src/fg_joystick.c index ab6f401..6f6771c 100644 --- a/src/fg_joystick.c +++ b/src/fg_joystick.c @@ -1,5 +1,5 @@ /* - * freeglut_joystick.c + * fg_joystick.c * * Joystick handling code * @@ -147,14 +147,12 @@ static int fghJoystickFindUSBdev(char *name, char *out, int outlen) if (cp) return 1; } -#ifdef HAVE_ERRNO_H else if (errno == EACCES) { if (!protection_warned) { fgWarning ( "Can't open %s for read!", buf ); protection_warned = 1; } } -#endif } return 0; } @@ -172,11 +170,7 @@ static int fghJoystickInitializeHID(struct os_specific_s *os, if ( ( rd = hid_get_report_desc( os->fd ) ) == 0 ) { -#ifdef HAVE_ERRNO_H fgWarning ( "error: %s: %s", os->fname, strerror( errno ) ); -#else - fgWarning ( "error: %s", os->fname ); -#endif return FALSE; } @@ -186,11 +180,7 @@ static int fghJoystickInitializeHID(struct os_specific_s *os, if( ioctl( os->fd, USB_GET_REPORT_ID, &report_id ) < 0) { /*** XXX {report_id} may not be the right variable? ***/ -#ifdef HAVE_ERRNO_H fgWarning ( "error: %s%d: %s", UHIDDEV, report_id, strerror( errno ) ); -#else - fgWarning ( "error: %s%d", UHIDDEV, report_id ); -#endif return FALSE; } @@ -334,7 +324,7 @@ static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes ) if( joy->error ) return; - fgPlatformJoystickRawRead ( joy, buttons, axes ); + fgPlatformJoystickRawRead ( joy, buttons, axes ); } /*