comparison src/joystick/darwin/SDL_sysjoystick.c @ 3945:14bec334705f SDL-1.2

Mac OS X joystick calibration code should start with device-specified bounds. Fixes Bugzilla #344.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 29 May 2007 12:01:07 +0000
parents 7156c3b5536b
children e3945f84427f
comparison
equal deleted inserted replaced
3944:d59dacd36696 3945:14bec334705f
239 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementCookieKey)); 239 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementCookieKey));
240 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) 240 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))
241 pElement->cookie = (IOHIDElementCookie) number; 241 pElement->cookie = (IOHIDElementCookie) number;
242 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMinKey)); 242 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMinKey));
243 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) 243 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))
244 pElement->min = number; 244 pElement->minReport = pElement->min = number;
245 pElement->maxReport = pElement->min;
246 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMaxKey)); 245 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMaxKey));
247 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) 246 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))
248 pElement->max = number; 247 pElement->maxReport = pElement->max = number;
249 pElement->minReport = pElement->max;
250 /* 248 /*
251 TODO: maybe should handle the following stuff somehow? 249 TODO: maybe should handle the following stuff somehow?
252 250
253 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey)); 251 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey));
254 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) 252 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))