Mercurial > sdl-ios-xcode
comparison src/joystick/bsd/SDL_sysjoystick.c @ 3703:df65ae8f32e8
Merged r5547:5548 from branches/SDL-1.2: FreeBSD joystick uninit'd var fix.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 05 Feb 2010 19:23:59 +0000 |
parents | f7b03b6838cb |
children | cd344ebc14e9 |
comparison
equal
deleted
inserted
replaced
3702:6604099437ac | 3703:df65ae8f32e8 |
---|---|
305 if (hw->repdesc == NULL) { | 305 if (hw->repdesc == NULL) { |
306 SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path, | 306 SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path, |
307 strerror(errno)); | 307 strerror(errno)); |
308 goto usberr; | 308 goto usberr; |
309 } | 309 } |
310 rep = &hw->inreport; | |
310 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) | 311 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063) |
311 rep->rid = hid_get_report_id(fd); | 312 rep->rid = hid_get_report_id(fd); |
312 if (rep->rid < 0) { | 313 if (rep->rid < 0) { |
313 #else | 314 #else |
314 rep = &hw->inreport; | |
315 if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) { | 315 if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) { |
316 #endif | 316 #endif |
317 rep->rid = -1; /* XXX */ | 317 rep->rid = -1; /* XXX */ |
318 } | 318 } |
319 if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) { | 319 if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) { |