mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 19:02:42 +00:00
keyboard fixes v2
This commit is contained in:
parent
0df4f7db4f
commit
3cddb62aea
@ -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());
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user