Darrell's Jag joystick fix
authorSam Lantinga <slouken@libsdl.org>
Sat, 31 Aug 2002 01:31:44 +0000
changeset 475429fe382fe4f
parent 474 583a07ab5444
child 476 a7129c0083f4
Darrell's Jag joystick fix
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Wed Aug 28 23:25:09 2002 +0000
     1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Sat Aug 31 01:31:44 2002 +0000
     1.3 @@ -42,6 +42,7 @@
     1.4  #include <IOKit/hid/IOHIDLib.h>
     1.5  #include <IOKit/hid/IOHIDKeys.h>
     1.6  #include <CoreFoundation/CoreFoundation.h>
     1.7 +#include <Carbon/Carbon.h> /* for NewPtrClear, DisposePtr */
     1.8  
     1.9  #include "SDL_error.h"
    1.10  #include "SDL_joystick.h"
    1.11 @@ -595,9 +596,9 @@
    1.12  		/* Add key for device type (joystick, in this case) to refine the matching dictionary. */
    1.13  		CFNumberRef refUsage = NULL, refUsagePage = NULL;
    1.14  
    1.15 -		refUsage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usagePage);
    1.16 +		refUsage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usage);
    1.17  		CFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsageKey), refUsage);
    1.18 -		refUsagePage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usage);
    1.19 +		refUsagePage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usagePage);
    1.20  		CFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsagePageKey), refUsagePage);
    1.21  	}
    1.22  	else