mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
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
This commit is contained in:
@ -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
|
||||
|
@ -262,20 +262,22 @@ std::string KeyboardMouse::Key::GetName() const
|
||||
|
||||
std::string KeyboardMouse::Button::GetName() const
|
||||
{
|
||||
return std::string("Button ") + char('0'+m_index);
|
||||
return std::string("Button ") + char('0' + m_index);
|
||||
}
|
||||
|
||||
std::string KeyboardMouse::Axis::GetName() const
|
||||
{
|
||||
std::string tmpstr("Axis ");
|
||||
tmpstr += "XYZ"[m_index]; tmpstr += (m_range>0 ? '+' : '-');
|
||||
static char tmpstr[] = "Axis ..";
|
||||
tmpstr[5] = (char)('X' + m_index);
|
||||
tmpstr[6] = (m_range<0 ? '-' : '+');
|
||||
return tmpstr;
|
||||
}
|
||||
|
||||
std::string KeyboardMouse::Cursor::GetName() const
|
||||
{
|
||||
std::string tmpstr("Cursor ");
|
||||
tmpstr += "XY"[m_index]; tmpstr += (m_positive ? '+' : '-');
|
||||
static char tmpstr[] = "Cursor ..";
|
||||
tmpstr[7] = (char)('X' + m_index);
|
||||
tmpstr[8] = (m_positive ? '+' : '-');
|
||||
return tmpstr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user