mirror of https://github.com/bsnes-emu/bsnes.git
Restore IOKit fix that was missing from higan ruby sync.
This commit is contained in:
parent
d2211d8818
commit
2223a843c9
|
@ -14,6 +14,7 @@ struct InputJoypadIOKit {
|
|||
for(uint n : range(CFArrayGetCount(elements))) {
|
||||
IOHIDElementRef element = (IOHIDElementRef)CFArrayGetValueAtIndex(elements, n);
|
||||
IOHIDElementType type = IOHIDElementGetType(element);
|
||||
uint32_t page = IOHIDElementGetUsagePage(element);
|
||||
uint32_t usage = IOHIDElementGetUsage(element);
|
||||
switch(type) {
|
||||
case kIOHIDElementTypeInput_Button:
|
||||
|
@ -21,6 +22,7 @@ struct InputJoypadIOKit {
|
|||
break;
|
||||
case kIOHIDElementTypeInput_Axis:
|
||||
case kIOHIDElementTypeInput_Misc:
|
||||
if(page != kHIDPage_GenericDesktop && page != kHIDPage_Simulation) break;
|
||||
if(usage == kHIDUsage_Sim_Accelerator || usage == kHIDUsage_Sim_Brake
|
||||
|| usage == kHIDUsage_Sim_Rudder || usage == kHIDUsage_Sim_Throttle
|
||||
|| usage == kHIDUsage_GD_X || usage == kHIDUsage_GD_Y || usage == kHIDUsage_GD_Z
|
||||
|
|
Loading…
Reference in New Issue