changeset 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 d59dacd36696
children 259aaca0fb0c
files src/joystick/darwin/SDL_sysjoystick.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/joystick/darwin/SDL_sysjoystick.c	Sun May 27 08:53:48 2007 +0000
+++ b/src/joystick/darwin/SDL_sysjoystick.c	Tue May 29 12:01:07 2007 +0000
@@ -241,12 +241,10 @@
 		pElement->cookie = (IOHIDElementCookie) number;
 	refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMinKey));
 	if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))
-		pElement->min = number;
-		pElement->maxReport = pElement->min;
+		pElement->minReport = pElement->min = number;
 	refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMaxKey));
 	if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number))
-		pElement->max = number;
-		pElement->minReport = pElement->max;
+		pElement->maxReport = pElement->max = number;
 /*
 	TODO: maybe should handle the following stuff somehow?