Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Darrell's Jag joystick fix
  • Loading branch information
slouken committed Aug 31, 2002
1 parent dcc4152 commit a890a9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a890a9c

Please sign in to comment.