Debian patch: 215_kfreebsd_gnu.diff
This commit is contained in:
parent
8c93eb3a9f
commit
ce200fdf85
1 changed files with 7 additions and 7 deletions
|
@ -59,7 +59,7 @@
|
||||||
#include <libusbhid.h>
|
#include <libusbhid.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FREEBSD__
|
#ifdef defined(__FREEBSD__) || defined(__FreeBSD_kernel__)
|
||||||
#ifndef __DragonFly__
|
#ifndef __DragonFly__
|
||||||
#include <osreldate.h>
|
#include <osreldate.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
#define MAX_JOY_JOYS 2
|
#define MAX_JOY_JOYS 2
|
||||||
#define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS)
|
#define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS)
|
||||||
|
|
||||||
#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
|
#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) && false
|
||||||
struct usb_ctl_report {
|
struct usb_ctl_report {
|
||||||
int ucr_report;
|
int ucr_report;
|
||||||
u_char ucr_data[1024]; /* filled data size will vary */
|
u_char ucr_data[1024]; /* filled data size will vary */
|
||||||
|
@ -149,7 +149,7 @@ static char *joydevnames[MAX_JOYS];
|
||||||
static int report_alloc(struct report *, struct report_desc *, int);
|
static int report_alloc(struct report *, struct report_desc *, int);
|
||||||
static void report_free(struct report *);
|
static void report_free(struct report *);
|
||||||
|
|
||||||
#if defined(USBHID_UCR_DATA) || (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063))
|
#if defined(USBHID_UCR_DATA) || (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)) || defined(__FreeBSD_kernel__)
|
||||||
#define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
|
#define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
|
||||||
#else
|
#else
|
||||||
#define REP_BUF_DATA(rep) ((rep)->buf->data)
|
#define REP_BUF_DATA(rep) ((rep)->buf->data)
|
||||||
|
@ -308,7 +308,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy)
|
||||||
goto usberr;
|
goto usberr;
|
||||||
}
|
}
|
||||||
rep = &hw->inreport;
|
rep = &hw->inreport;
|
||||||
#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
|
#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) || defined(__FreeBSD_kernel__)
|
||||||
rep->rid = hid_get_report_id(fd);
|
rep->rid = hid_get_report_id(fd);
|
||||||
if (rep->rid < 0) {
|
if (rep->rid < 0) {
|
||||||
#else
|
#else
|
||||||
|
@ -324,7 +324,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy)
|
||||||
hw->path);
|
hw->path);
|
||||||
goto usberr;
|
goto usberr;
|
||||||
}
|
}
|
||||||
#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111)
|
#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111) || defined(__FreeBSD_kernel__)
|
||||||
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);
|
||||||
|
@ -409,7 +409,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joy)
|
||||||
int nbutton, naxe = -1;
|
int nbutton, naxe = -1;
|
||||||
Sint32 v;
|
Sint32 v;
|
||||||
|
|
||||||
#if defined(__FREEBSD__) || SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
#if defined(__FREEBSD__) || SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H || defined(__FreeBSD_kernel__)
|
||||||
struct joystick gameport;
|
struct joystick gameport;
|
||||||
static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0;
|
static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0;
|
||||||
|
|
||||||
|
@ -466,7 +466,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_kernel_version >= 500111)
|
#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111) || defined(__FreeBSD_kernel__)
|
||||||
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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue