diff options
| author | Nick <nick@nicks-imac.attlocal.net> | 2017-08-22 12:26:44 -0400 |
|---|---|---|
| committer | Nick <nick@nicks-imac.attlocal.net> | 2017-08-22 12:26:44 -0400 |
| commit | 3cddb62aeae9259eea255509055a0f9acd03d48c (patch) | |
| tree | 52ef5141d7b0fb86f04e20a5fac29beb944cd4ff /Source/Core/InputCommon | |
| parent | 0df4f7db4fc8a843d6740e01d305ed406620674a (diff) | |
keyboard fixes v2
Diffstat (limited to 'Source/Core/InputCommon')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm | 5 | ||||
| -rw-r--r-- | Source/Core/InputCommon/InputConfig.cpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm b/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm index 3a0fe1eeca..036c27d58c 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm @@ -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()); diff --git a/Source/Core/InputCommon/InputConfig.cpp b/Source/Core/InputCommon/InputConfig.cpp index 5cf24a9b93..8ae380ad33 100644 --- a/Source/Core/InputCommon/InputConfig.cpp +++ b/Source/Core/InputCommon/InputConfig.cpp @@ -136,7 +136,7 @@ bool InputConfig::IsControllerControlledByGamepadDevice(int index) const const auto& controller = m_controllers.at(index).get()->default_device; // Filter out anything which obviously not a gamepad - return !((controller.source == "Quartz") // OSX Quartz Keyboard/Mouse + return !((controller.source == "Quartz") // OSX Quartz Keyboard/Mouse || (controller.source == "XInput2") // Linux and BSD Keyboard/Mouse || (controller.source == "Android" && controller.name == "Touchscreen") // Android Touchscreen |
