Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
*** empty log message ***
  • Loading branch information
slouken committed Dec 2, 2002
1 parent 9ae152e commit dca396b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/joystick/bsd/SDL_sysjoystick.c
Expand Up @@ -32,6 +32,8 @@ static char rcsid =
"@(#) $Id$";
#endif

#include <sys/param.h>

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Expand Down Expand Up @@ -406,11 +408,20 @@ report_alloc(struct report *r, struct report_desc *rd, int repind)
{
int len;

#ifdef USBHID_NEW
len = hid_report_size(rd, repinfo[repind].kind, r->rid);
#ifdef __FreeBSD__
# if (__FreeBSD_version >= 470000)
len = hid_report_size(rd, r->rid, repinfo[repind].kind);
# else
len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
#endif
#else
# ifdef USBHID_NEW
len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
# else
len = hid_report_size(rd, repinfo[repind].kind, r->rid);
# endif
#endif

if (len < 0) {
SDL_SetError("Negative HID report size");
return (-1);
Expand Down

0 comments on commit dca396b

Please sign in to comment.