Mercurial > sdl-ios-xcode
changeset 475:429fe382fe4f
Darrell's Jag joystick fix
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 31 Aug 2002 01:31:44 +0000 |
parents | 583a07ab5444 |
children | a7129c0083f4 |
files | src/joystick/darwin/SDL_sysjoystick.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/joystick/darwin/SDL_sysjoystick.c Wed Aug 28 23:25:09 2002 +0000 +++ b/src/joystick/darwin/SDL_sysjoystick.c Sat Aug 31 01:31:44 2002 +0000 @@ -42,6 +42,7 @@ #include <IOKit/hid/IOHIDLib.h> #include <IOKit/hid/IOHIDKeys.h> #include <CoreFoundation/CoreFoundation.h> +#include <Carbon/Carbon.h> /* for NewPtrClear, DisposePtr */ #include "SDL_error.h" #include "SDL_joystick.h" @@ -595,9 +596,9 @@ /* Add key for device type (joystick, in this case) to refine the matching dictionary. */ CFNumberRef refUsage = NULL, refUsagePage = NULL; - refUsage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usagePage); + refUsage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usage); CFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsageKey), refUsage); - refUsagePage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usage); + refUsagePage = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &usagePage); CFDictionarySetValue (hidMatchDictionary, CFSTR (kIOHIDPrimaryUsagePageKey), refUsagePage); } else