Mercurial > sdl-ios-xcode
diff src/joystick/bsd/SDL_sysjoystick.c @ 4305:ecb22f65f0aa SDL-1.2
Adapted from 215_kfreebsd_gnu.diff
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 10 Oct 2009 09:38:02 +0000 |
parents | a1b03ba2fcd0 |
children | aa6aac8a5243 |
line wrap: on
line diff
--- a/src/joystick/bsd/SDL_sysjoystick.c Sat Oct 10 09:28:35 2009 +0000 +++ b/src/joystick/bsd/SDL_sysjoystick.c Sat Oct 10 09:38:02 2009 +0000 @@ -306,7 +306,7 @@ goto usberr; } -#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111) +#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111) hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid); #else hdata = hid_start_parse(hw->repdesc, 1 << hid_input); @@ -445,7 +445,7 @@ 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_kernel_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); @@ -541,8 +541,8 @@ #ifdef __DragonFly__ len = hid_report_size(rd, r->rid, repinfo[repind].kind); #elif __FREEBSD__ -# if (__FreeBSD_version >= 460000) -# if (__FreeBSD_version <= 500111) +# if (__FreeBSD_kernel_version >= 460000) || defined(__FreeBSD_kernel__) +# if (__FreeBSD_kernel_version <= 500111) len = hid_report_size(rd, r->rid, repinfo[repind].kind); # else len = hid_report_size(rd, repinfo[repind].kind, r->rid);