Mercurial > sdl-ios-xcode
comparison src/joystick/darwin/SDL_sysjoystick.c @ 2109:51cbe188a49e
Merged r3029:3030 from branches/SDL-1.2: Mac OS X joystick axis fix.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 29 May 2007 12:14:16 +0000 |
parents | b0048df1701a |
children | 21942f552734 |
comparison
equal
deleted
inserted
replaced
2108:a930c8e4d8b0 | 2109:51cbe188a49e |
---|---|
256 refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementCookieKey)); | 256 refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementCookieKey)); |
257 if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) | 257 if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) |
258 pElement->cookie = (IOHIDElementCookie) number; | 258 pElement->cookie = (IOHIDElementCookie) number; |
259 refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementMinKey)); | 259 refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementMinKey)); |
260 if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) | 260 if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) |
261 pElement->min = number; | 261 pElement->minReport = pElement->min = number; |
262 pElement->maxReport = pElement->min; | 262 pElement->maxReport = pElement->min; |
263 refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementMaxKey)); | 263 refType = CFDictionaryGetValue(refElement, CFSTR(kIOHIDElementMaxKey)); |
264 if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) | 264 if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) |
265 pElement->max = number; | 265 pElement->maxReport = pElement->max = number; |
266 pElement->minReport = pElement->max; | |
267 /* | 266 /* |
268 TODO: maybe should handle the following stuff somehow? | 267 TODO: maybe should handle the following stuff somehow? |
269 | 268 |
270 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey)); | 269 refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey)); |
271 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) | 270 if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) |