summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Xlib
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-22 14:10:28 -0500
committerLioncash <mathew1800@gmail.com>2019-11-22 14:38:26 -0500
commite8edc49bbec053e3ee08f6ffc8be39935c6fa6d1 (patch)
treef355306567ea56c2d96819ad1fa01165620d9898 /Source/Core/InputCommon/ControllerInterface/Xlib
parentbc449fb98f3b741f78d8881e2c02d588829aad74 (diff)
InputCommon: Make use of fmt where applicable
Continues the migration over to fmt
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Xlib')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
index 30f10c8537..d9642c6264 100644
--- a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
@@ -10,6 +10,8 @@
#include <cstdlib>
#include <cstring>
+#include <fmt/format.h>
+
#include "InputCommon/ControllerInterface/Xlib/XInput2.h"
#include "Common/StringUtil.h"
@@ -338,7 +340,7 @@ ControlState KeyboardMouse::Key::GetState() const
KeyboardMouse::Button::Button(unsigned int index, unsigned int* buttons)
: m_buttons(buttons), m_index(index)
{
- name = StringFromFormat("Click %d", m_index + 1);
+ name = fmt::format("Click {}", m_index + 1);
}
ControlState KeyboardMouse::Button::GetState() const
@@ -349,7 +351,7 @@ ControlState KeyboardMouse::Button::GetState() const
KeyboardMouse::Cursor::Cursor(u8 index, bool positive, const float* cursor)
: m_cursor(cursor), m_index(index), m_positive(positive)
{
- name = std::string("Cursor ") + (char)('X' + m_index) + (m_positive ? '+' : '-');
+ name = fmt::format("Cursor {}{}", static_cast<char>('X' + m_index), (m_positive ? '+' : '-'));
}
ControlState KeyboardMouse::Cursor::GetState() const
@@ -360,7 +362,7 @@ ControlState KeyboardMouse::Cursor::GetState() const
KeyboardMouse::Axis::Axis(u8 index, bool positive, const float* axis)
: m_axis(axis), m_index(index), m_positive(positive)
{
- name = std::string("Axis ") + (char)('X' + m_index) + (m_positive ? '+' : '-');
+ name = fmt::format("Axis {}{}", static_cast<char>('X' + m_index), (m_positive ? '+' : '-'));
}
ControlState KeyboardMouse::Axis::GetState() const