mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 06:39:14 +01:00
Number "unknown" axes in OSX rather than call them all "unk".
This commit is contained in:
parent
937d9e9007
commit
f506783c37
@ -121,7 +121,9 @@ Joystick::Axis::Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction d
|
|||||||
// Need to parse the element a bit first
|
// Need to parse the element a bit first
|
||||||
std::string description("unk");
|
std::string description("unk");
|
||||||
|
|
||||||
switch (IOHIDElementGetUsage(m_element)) {
|
int const usage = IOHIDElementGetUsage(m_element);
|
||||||
|
switch (usage)
|
||||||
|
{
|
||||||
case kHIDUsage_GD_X:
|
case kHIDUsage_GD_X:
|
||||||
description = "X";
|
description = "X";
|
||||||
break;
|
break;
|
||||||
@ -146,6 +148,13 @@ Joystick::Axis::Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction d
|
|||||||
case kHIDUsage_Csmr_ACPan:
|
case kHIDUsage_Csmr_ACPan:
|
||||||
description = "Pan";
|
description = "Pan";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
std::ostringstream s;
|
||||||
|
s << usage;
|
||||||
|
description = s.str();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_name = std::string("Axis ") + description;
|
m_name = std::string("Axis ") + description;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user