Mercurial > sdl-ios-xcode
comparison src/joystick/bsd/SDL_sysjoystick.c @ 552:639d58d32471
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 02 Dec 2002 02:35:58 +0000 |
parents | 2d7373ffd131 |
children | 0a2ef9e8ca41 |
comparison
equal
deleted
inserted
replaced
551:b0c5a13a4243 | 552:639d58d32471 |
---|---|
29 | 29 |
30 #ifdef SAVE_RCSID | 30 #ifdef SAVE_RCSID |
31 static char rcsid = | 31 static char rcsid = |
32 "@(#) $Id$"; | 32 "@(#) $Id$"; |
33 #endif | 33 #endif |
34 | |
35 #include <sys/param.h> | |
34 | 36 |
35 #include <stdio.h> | 37 #include <stdio.h> |
36 #include <stdlib.h> | 38 #include <stdlib.h> |
37 #include <unistd.h> | 39 #include <unistd.h> |
38 #include <fcntl.h> | 40 #include <fcntl.h> |
404 static int | 406 static int |
405 report_alloc(struct report *r, struct report_desc *rd, int repind) | 407 report_alloc(struct report *r, struct report_desc *rd, int repind) |
406 { | 408 { |
407 int len; | 409 int len; |
408 | 410 |
409 #ifdef USBHID_NEW | 411 #ifdef __FreeBSD__ |
412 # if (__FreeBSD_version >= 470000) | |
413 len = hid_report_size(rd, r->rid, repinfo[repind].kind); | |
414 # else | |
415 len = hid_report_size(rd, repinfo[repind].kind, &r->rid); | |
416 #endif | |
417 #else | |
418 # ifdef USBHID_NEW | |
419 len = hid_report_size(rd, repinfo[repind].kind, &r->rid); | |
420 # else | |
410 len = hid_report_size(rd, repinfo[repind].kind, r->rid); | 421 len = hid_report_size(rd, repinfo[repind].kind, r->rid); |
411 #else | 422 # endif |
412 len = hid_report_size(rd, repinfo[repind].kind, &r->rid); | 423 #endif |
413 #endif | 424 |
414 if (len < 0) { | 425 if (len < 0) { |
415 SDL_SetError("Negative HID report size"); | 426 SDL_SetError("Negative HID report size"); |
416 return (-1); | 427 return (-1); |
417 } | 428 } |
418 r->size = len; | 429 r->size = len; |