From 27d3e5f271b221fb538a82c1ebf2a014185d6bb1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 29 May 2007 12:01:07 +0000 Subject: [PATCH] Mac OS X joystick calibration code should start with device-specified bounds. Fixes Bugzilla #344. --HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402320 --- src/joystick/darwin/SDL_sysjoystick.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index 8a152e8b0..8fd983ee2 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -241,12 +241,10 @@ static void HIDGetElementInfo (CFTypeRef refElement, recElement *pElement) 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?