Mercurial > sdl-ios-xcode
diff src/joystick/bsd/SDL_sysjoystick.c @ 1402:d910939febfa
Use consistent identifiers for the various platforms we support.
Make sure every source file includes SDL_config.h, so the proper system
headers are chosen.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 21 Feb 2006 08:46:50 +0000 |
parents | 19418e4422cb |
children | e7f61857028a |
line wrap: on
line diff
--- a/src/joystick/bsd/SDL_sysjoystick.c Tue Feb 21 08:34:45 2006 +0000 +++ b/src/joystick/bsd/SDL_sysjoystick.c Tue Feb 21 08:46:50 2006 +0000 @@ -19,6 +19,7 @@ Sam Lantinga slouken@libsdl.org */ +#include "SDL_config.h" /* * Joystick driver for the uhid(4) interface found in OpenBSD, @@ -47,12 +48,12 @@ #include <libusbhid.h> #endif -#ifdef __FreeBSD__ +#ifdef __FREEBSD__ #include <osreldate.h> #include <sys/joystick.h> #endif -#if defined(__NetBSD__) || (defined(__OpenBSD__) && defined(__i386__)) +#if defined(__NETBSD__) || (defined(__OPENBSD__) && defined(__i386__)) #include <machine/joystick.h> #endif @@ -281,7 +282,7 @@ goto usberr; } -#if defined(USBHID_NEW) || (defined(__FreeBSD__) && __FreeBSD_version >= 500111) +#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111) hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid); #else hdata = hid_start_parse(hw->repdesc, 1 << hid_input); @@ -361,7 +362,7 @@ int nbutton, naxe = -1; Sint32 v; -#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(__OpenBSD__) && defined(__i386__)) +#if defined(__FREEBSD__) || defined(__NETBSD__) || (defined(__OPENBSD__) && defined(__i386__)) struct joystick gameport; static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0; @@ -410,14 +411,14 @@ } return; } -#endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */ +#endif /* defined(__FREEBSD__) || defined(__NETBSD__) || defined(__OPENBSD__) */ rep = &joy->hwdata->inreport; if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) { return; } -#if defined(USBHID_NEW) || (defined(__FreeBSD__) && __FreeBSD_version >= 500111) +#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111) hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid); #else hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input); @@ -509,7 +510,7 @@ { int len; -#ifdef __FreeBSD__ +#ifdef __FREEBSD__ # if (__FreeBSD_version >= 460000) # if (__FreeBSD_version <= 500111) len = hid_report_size(rd, r->rid, repinfo[repind].kind);