(Apple HID) Cleanup
This commit is contained in:
parent
288847fa49
commit
a25a1fc66a
|
@ -102,11 +102,12 @@ static void hid_device_input_callback(void* context, IOReturn result,
|
||||||
case kIOHIDElementTypeInput_Button:
|
case kIOHIDElementTypeInput_Button:
|
||||||
{
|
{
|
||||||
CFIndex state = IOHIDValueGetIntegerValue(value);
|
CFIndex state = IOHIDValueGetIntegerValue(value);
|
||||||
|
unsigned id = use - 1;
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
apple->buttons[connection->slot] |= (1 << (use - 1));
|
apple->buttons[connection->slot] |= (1 << id);
|
||||||
else
|
else
|
||||||
apple->buttons[connection->slot] &= ~(1 << (use - 1));
|
apple->buttons[connection->slot] &= ~(1 << id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue