Restore joystick fix from ports/136973.

Submitted by:	Adam K Kirchhoff <adamk@voicenet.com>
This commit is contained in:
Marcus von Appen 2010-02-05 10:30:49 +00:00
parent bcab2f75b4
commit fba82b2a96
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=249284
2 changed files with 17 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= sdl
PORTVERSION= 1.2.14
PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= http://www.libsdl.org/release/

View file

@ -0,0 +1,16 @@
--- src/joystick/bsd/SDL_sysjoystick.c.orig 2010-02-05 11:17:18.000000000 +0100
+++ src/joystick/bsd/SDL_sysjoystick.c 2010-02-05 11:18:15.000000000 +0100
@@ -303,11 +303,12 @@
strerror(errno));
goto usberr;
}
+
+ rep = &hw->inreport;
#if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
rep->rid = hid_get_report_id(fd);
if (rep->rid < 0) {
#else
- rep = &hw->inreport;
if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
#endif
rep->rid = -1; /* XXX */