Mac OS X joystick calibration code should start with device-specified bounds. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Tue, 29 May 2007 12:01:07 +0000
branchSDL-1.2
changeset 394514bec334705f
parent 3944 d59dacd36696
child 3946 259aaca0fb0c
Mac OS X joystick calibration code should start with device-specified bounds.

Fixes Bugzilla #344.
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Sun May 27 08:53:48 2007 +0000
     1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Tue May 29 12:01:07 2007 +0000
     1.3 @@ -241,12 +241,10 @@
     1.4  		pElement->cookie = (IOHIDElementCookie) number;
     1.5  	refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMinKey));
     1.6  	if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))
     1.7 -		pElement->min = number;
     1.8 -		pElement->maxReport = pElement->min;
     1.9 +		pElement->minReport = pElement->min = number;
    1.10  	refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMaxKey));
    1.11  	if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))
    1.12 -		pElement->max = number;
    1.13 -		pElement->minReport = pElement->max;
    1.14 +		pElement->maxReport = pElement->max = number;
    1.15  /*
    1.16  	TODO: maybe should handle the following stuff somehow?
    1.17