diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2010-07-16 03:43:11 +0000 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2010-07-16 03:43:11 +0000 |
| commit | deffc957948dd86306a6845c24db42fca7d71288 (patch) | |
| tree | e2a5ece931bf5a96be106e985e78a047c583b87e /Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp | |
| parent | f4385328798fb7c241105e6154da69522ba785d9 (diff) | |
New Wiimote Plugin: Moved Linux cursor position code into ControllerInterface/Xlib. (absolute cursor position can be mapped to something other than IR camera) (code fixed by Glennrics) Put the UDP Wiimote dialog's Update Buttons,Update IR,Update Nunchuk... checkboxes in an "Update" group box. Fixed some Linux config dialog problems. (thanks Glennrics again) Some other minor cleanup in ControllerInterface. (changed some std::string/stringstream to char[] where possible) Removed a warning in DX11 plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5880 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp index 2eac4be616..0f43a47a53 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp @@ -474,9 +474,9 @@ std::string Joystick::Axis::GetName() const { std::ostringstream ss; // axis - if ( m_index < 6 ) + if (m_index < 6) { - ss << "Axis " << "XYZ"[m_index%3]; + ss << "Axis " << (char)('X' + (m_index % 3)); if ( m_index > 2 ) ss << 'r'; } @@ -484,15 +484,16 @@ std::string Joystick::Axis::GetName() const else ss << "Slider " << m_index-6; - ss << ( m_range>0 ? '+' : '-' ); + ss << (m_range<0 ? '-' : '+'); return ss.str(); } std::string Joystick::Hat::GetName() const { - std::ostringstream ss; - ss << "Hat " << m_index << ' ' << "NESW"[m_direction]; - return ss.str(); + static char tmpstr[] = "Hat . ."; + tmpstr[4] = (char)('0' + m_index); + tmpstr[6] = "NESW"[m_direction]; + return tmpstr; } std::string Joystick::Force::GetName() const |
