Adapted from Debian patch: 215_kfreebsd_gnu.diff
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404023
This commit is contained in:
parent
7075c8391a
commit
abf5cb8c2f
2 changed files with 5 additions and 5 deletions
|
@ -45,7 +45,7 @@
|
||||||
#undef __DREAMCAST__
|
#undef __DREAMCAST__
|
||||||
#define __DREAMCAST__ 1
|
#define __DREAMCAST__ 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
#undef __FREEBSD__
|
#undef __FREEBSD__
|
||||||
#define __FREEBSD__ 1
|
#define __FREEBSD__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -309,7 +309,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy)
|
||||||
hw->path);
|
hw->path);
|
||||||
goto usberr;
|
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);
|
hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid);
|
||||||
#else
|
#else
|
||||||
hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
|
hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
|
||||||
|
@ -451,7 +451,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joy)
|
||||||
if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) {
|
if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) {
|
||||||
return;
|
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);
|
hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid);
|
||||||
#else
|
#else
|
||||||
hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
|
hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
|
||||||
|
@ -547,8 +547,8 @@ report_alloc(struct report *r, struct report_desc *rd, int repind)
|
||||||
#ifdef __DragonFly__
|
#ifdef __DragonFly__
|
||||||
len = hid_report_size(rd, r->rid, repinfo[repind].kind);
|
len = hid_report_size(rd, r->rid, repinfo[repind].kind);
|
||||||
#elif __FREEBSD__
|
#elif __FREEBSD__
|
||||||
# if (__FreeBSD_version >= 460000)
|
# if (__FreeBSD_kernel_version >= 460000) || defined(__FreeBSD_kernel__)
|
||||||
# if (__FreeBSD_version <= 500111)
|
# if (__FreeBSD_kernel_version <= 500111)
|
||||||
len = hid_report_size(rd, r->rid, repinfo[repind].kind);
|
len = hid_report_size(rd, r->rid, repinfo[repind].kind);
|
||||||
# else
|
# else
|
||||||
len = hid_report_size(rd, repinfo[repind].kind, r->rid);
|
len = hid_report_size(rd, repinfo[repind].kind, r->rid);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue