summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2017-08-07 13:44:07 +1200
committerGitHub <noreply@github.com>2017-08-07 13:44:07 +1200
commit3b5cad66820441373d8210fb0d40166748fd2a62 (patch)
tree031c9f05902626d58201093dec032aee104e41c5 /Source/Core/InputCommon/ControllerInterface
parentbc11fad6eb8c048ab76833e16aa15ffd7925b938 (diff)
parent200fb26148630d59e77f7a1574617b496df082a7 (diff)
Merge pull request #5860 from jturcotte/fix-macos-nswitch-axis
Fix axis not working with Switch Pro controller on macOS
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm
index e8595153f2..9bbd953a4b 100644
--- a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm
+++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm
@@ -39,7 +39,10 @@ Joystick::Joystick(IOHIDDeviceRef device, std::string name)
}
// Axes
- NSDictionary* axisDict = @{ @kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Misc) };
+ NSDictionary* axisDict = @{
+ @kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Misc),
+ @kIOHIDElementUsagePageKey : @(kHIDPage_GenericDesktop)
+ };
CFArrayRef axes =
IOHIDDeviceCopyMatchingElements(m_device, (CFDictionaryRef)axisDict, kIOHIDOptionsTypeNone);