src/joystick/bsd/SDL_sysjoystick.c
branchSDL-1.2
changeset 4305 ecb22f65f0aa
parent 4159 a1b03ba2fcd0
child 4306 aa6aac8a5243
     1.1 --- a/src/joystick/bsd/SDL_sysjoystick.c	Sat Oct 10 09:28:35 2009 +0000
     1.2 +++ b/src/joystick/bsd/SDL_sysjoystick.c	Sat Oct 10 09:38:02 2009 +0000
     1.3 @@ -306,7 +306,7 @@
     1.4  		goto usberr;
     1.5  	}
     1.6  
     1.7 -#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
     1.8 +#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111)
     1.9  	hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid);
    1.10  #else
    1.11  	hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
    1.12 @@ -445,7 +445,7 @@
    1.13  	if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) {
    1.14  		return;
    1.15  	}
    1.16 -#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
    1.17 +#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111)
    1.18  	hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid);
    1.19  #else
    1.20  	hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
    1.21 @@ -541,8 +541,8 @@
    1.22  #ifdef __DragonFly__
    1.23  	len = hid_report_size(rd, r->rid, repinfo[repind].kind);
    1.24  #elif __FREEBSD__
    1.25 -# if (__FreeBSD_version >= 460000)
    1.26 -#  if (__FreeBSD_version <= 500111)
    1.27 +# if (__FreeBSD_kernel_version >= 460000) || defined(__FreeBSD_kernel__)
    1.28 +#  if (__FreeBSD_kernel_version <= 500111)
    1.29  	len = hid_report_size(rd, r->rid, repinfo[repind].kind);
    1.30  #  else
    1.31  	len = hid_report_size(rd, repinfo[repind].kind, r->rid);