mirror of
https://github.com/glfw/glfw.git
synced 2024-11-12 17:51:48 +00:00
Cleanup
This commit is contained in:
parent
6634c47e57
commit
ea6c50d9e2
@ -196,39 +196,31 @@ static void matchCallback(void* context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
CFMutableArrayRef target = NULL;
|
CFMutableArrayRef target = NULL;
|
||||||
|
|
||||||
const uint32_t usage = IOHIDElementGetUsage(native);
|
const uint32_t usage = IOHIDElementGetUsage(native);
|
||||||
|
const uint32_t page = IOHIDElementGetUsagePage(native);
|
||||||
switch (IOHIDElementGetUsagePage(native))
|
if (page == kHIDPage_GenericDesktop)
|
||||||
{
|
{
|
||||||
case kHIDPage_GenericDesktop:
|
switch (usage)
|
||||||
{
|
{
|
||||||
switch (usage)
|
case kHIDUsage_GD_X:
|
||||||
{
|
case kHIDUsage_GD_Y:
|
||||||
case kHIDUsage_GD_X:
|
case kHIDUsage_GD_Z:
|
||||||
case kHIDUsage_GD_Y:
|
case kHIDUsage_GD_Rx:
|
||||||
case kHIDUsage_GD_Z:
|
case kHIDUsage_GD_Ry:
|
||||||
case kHIDUsage_GD_Rx:
|
case kHIDUsage_GD_Rz:
|
||||||
case kHIDUsage_GD_Ry:
|
case kHIDUsage_GD_Slider:
|
||||||
case kHIDUsage_GD_Rz:
|
case kHIDUsage_GD_Dial:
|
||||||
case kHIDUsage_GD_Slider:
|
case kHIDUsage_GD_Wheel:
|
||||||
case kHIDUsage_GD_Dial:
|
target = axes;
|
||||||
case kHIDUsage_GD_Wheel:
|
break;
|
||||||
target = axes;
|
case kHIDUsage_GD_Hatswitch:
|
||||||
break;
|
target = hats;
|
||||||
case kHIDUsage_GD_Hatswitch:
|
break;
|
||||||
target = hats;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case kHIDPage_Button:
|
|
||||||
target = buttons;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else if (page == kHIDPage_Button)
|
||||||
|
target = buttons;
|
||||||
|
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user