diff options
| author | Matthew Parlane <parlane@gmail.com> | 2013-02-09 20:13:11 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2013-02-09 20:13:11 +1300 |
| commit | 3d480c088fa27c6dcadef40042a0e8deb3093985 (patch) | |
| tree | ab6b184b074261f608dff9b06b5a6e2e6bf52b30 /Source/Core/InputCommon/Src/ControllerInterface/OSX | |
| parent | e62c9b0619a42f6e551ba928560fcb825b6ac9c5 (diff) | |
| parent | a11827cdf0ccc55b9a3f6259a27a9324e24cd018 (diff) | |
Merge branch 'master' into wii-network
Conflicts:
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/OSX')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm index 60c0cc8c50..0d89c2e393 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXJoystick.mm @@ -121,7 +121,9 @@ Joystick::Axis::Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction d // Need to parse the element a bit first std::string description("unk"); - switch (IOHIDElementGetUsage(m_element)) { + int const usage = IOHIDElementGetUsage(m_element); + switch (usage) + { case kHIDUsage_GD_X: description = "X"; break; @@ -146,6 +148,13 @@ Joystick::Axis::Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction d case kHIDUsage_Csmr_ACPan: description = "Pan"; break; + default: + { + std::ostringstream s; + s << usage; + description = s.str(); + break; + } } m_name = std::string("Axis ") + description; |
