keyboard fixes v2

This commit is contained in:
Nick 2017-08-22 12:26:44 -04:00
parent 0df4f7db4f
commit 3cddb62aea
2 changed files with 3 additions and 4 deletions

View File

@ -167,13 +167,12 @@ static void DeviceMatchingCallback(void* inContext, IOReturn inResult, void* inS
std::string name = GetDeviceRefName(inIOHIDDeviceRef);
// Add a device if it's of a type we want
if (IOHIDDeviceConformsTo(inIOHIDDeviceRef, kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard))
if (IOHIDDeviceConformsTo(inIOHIDDeviceRef, kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick))
{
g_controller_interface.AddDevice(std::make_shared<Joystick>(inIOHIDDeviceRef, name));
}
else
{
g_controller_interface.AddDevice(std::make_shared<Joystick>(inIOHIDDeviceRef, name));
}
NOTICE_LOG(SERIALINTERFACE, "Added device: %s", name.c_str());