mirror of https://github.com/snes9xgit/snes9x.git
Mac: Fix HID parsing for gamepads
This commit is contained in:
parent
04692e1ee4
commit
b11657cd0f
|
@ -274,7 +274,7 @@ void findControls(struct JoypadDevice &device, NSDictionary *properties, NSMutab
|
||||||
if (properties == nil)
|
if (properties == nil)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int usagePage = [properties[@kIOHIDElementUsagePageKey] intValue];
|
int usagePage = [properties[@kIOHIDElementUsagePageKey] intValue];
|
||||||
int usage = [properties[@kIOHIDElementUsageKey] intValue];
|
int usage = [properties[@kIOHIDElementUsageKey] intValue];
|
||||||
|
@ -293,13 +293,11 @@ void findControls(struct JoypadDevice &device, NSDictionary *properties, NSMutab
|
||||||
*hat = [properties[@kIOHIDElementCookieKey] intValue];
|
*hat = [properties[@kIOHIDElementCookieKey] intValue];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
for ( NSDictionary *child in properties[@kIOHIDElementKey] )
|
||||||
for ( NSDictionary *child in properties[@kIOHIDElementKey] )
|
{
|
||||||
{
|
findControls(device, child, buttons, axes, hat);
|
||||||
findControls(device, child, buttons, axes, hat);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParseDefaults (void)
|
void ParseDefaults (void)
|
||||||
|
|
Loading…
Reference in New Issue