Merged r5547:5548 from branches/SDL-1.2: FreeBSD joystick uninit'd var fix.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404462
This commit is contained in:
Ryan C. Gordon 2010-02-05 19:23:59 +00:00
parent b4ec792804
commit 2570f36a05

View File

@ -307,11 +307,11 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy)
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 */