Fixed uninitialized variable in FreeBSD joystick.

Patch by Marcus von Appen.

--HG--
branch : SDL-1.2
This commit is contained in:
Ryan C. Gordon
2010-02-05 19:20:49 +00:00
parent 30d034e824
commit 393fd240ce

View File

@@ -303,11 +303,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 */