diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp index f97ad986bb..043d7d5e2a 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp @@ -863,10 +863,8 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface) // TODO: finish this // Buttons - // these alright for OSX/Linux? - - set_control(m_buttons, 0, "Button 0"); // A - set_control(m_buttons, 1, "Button 1"); // B + set_control(m_buttons, 0, "Click 0"); // A + set_control(m_buttons, 1, "Click 1"); // B //set_control(m_buttons, 2, ""); // 1 //set_control(m_buttons, 3, ""); // 2 //set_control(m_buttons, 4, ""); // - @@ -875,7 +873,7 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface) // Shake for (unsigned int i=0; i<3; ++i) - set_control(m_shake, i, "Button 2"); + set_control(m_shake, i, "Click 2"); // IR #ifndef __APPLE__ diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp index e29c9d53e3..69e340d4f5 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp @@ -419,6 +419,29 @@ void ControllerInterface::UpdateReference(ControllerInterface::ControlReference* devc.control = *i; ref->m_controls.push_back(devc); } + else + { + // the input wasn't found, look through all the other devices + + std::vector::const_iterator + deviter = m_devices.begin(), + devend = m_devices.end(); + + for(; deviter != devend; ++deviter) + { + for(i = (*deviter)->Inputs().begin(); i < (*deviter)->Inputs().end(); ++i) + if(*(*i) == ctrl_str) + break; + + if ((*deviter)->Inputs().end() != i) + { + devc.device = *deviter; + devc.control = *i; + ref->m_controls.push_back(devc); + break; + } + } + } } else { diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp index 1cd925c992..69ffcf6e75 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp @@ -262,7 +262,7 @@ std::string KeyboardMouse::Key::GetName() const std::string KeyboardMouse::Button::GetName() const { - return std::string("Button ") + char('0' + m_index); + return std::string("Click ") + char('0' + m_index); } std::string KeyboardMouse::Axis::GetName() const diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXMouse.mm b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXMouse.mm index e55533aeba..b853d3b992 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXMouse.mm +++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXMouse.mm @@ -115,7 +115,7 @@ Mouse::Button::Button(IOHIDElementRef element) { std::ostringstream s; s << IOHIDElementGetUsage(m_element); - m_name = std::string("Button ") + s.str(); + m_name = std::string("Click ") + s.str(); } ControlState Mouse::Button::GetState(IOHIDDeviceRef device) const diff --git a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp index f1dcbaa79a..f9e05fbbab 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp @@ -162,7 +162,7 @@ std::string KeyboardMouse::Button::GetName() const case Button5Mask: button = '5'; break; } - static char tmpstr[] = "Button ."; + static char tmpstr[] = "Click ."; tmpstr[7] = button; return tmpstr; }