From a890a9c85377c48fa1efad02178f87570943d041 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 31 Aug 2002 01:31:44 +0000 Subject: [PATCH] Darrell's Jag joystick fix --- src/joystick/darwin/SDL_sysjoystick.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index 5ce67b0b1..88803f44a 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -42,6 +42,7 @@ #include #include #include +#include /* for NewPtrClear, DisposePtr */ #include "SDL_error.h" #include "SDL_joystick.h" @@ -595,9 +596,9 @@ int SDL_SYS_JoystickInit(void) /* 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