aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/joystick_controller.cpp3
-rw-r--r--src/client/joystick_controller.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp
index 3e1442793..cb9d64b9f 100644
--- a/src/client/joystick_controller.cpp
+++ b/src/client/joystick_controller.cpp
@@ -185,7 +185,8 @@ void JoystickController::onJoystickConnect(const std::vector<irr::SJoystickInfo>
m_joystick_id = id;
}
-void JoystickController::setLayoutFromControllerName(std::string name) {
+void JoystickController::setLayoutFromControllerName(const std::string &name)
+{
if (lowercase(name).find("xbox") != std::string::npos) {
m_layout = create_xbox_layout();
} else {
diff --git a/src/client/joystick_controller.h b/src/client/joystick_controller.h
index 867a0c3f2..2c0e7b90a 100644
--- a/src/client/joystick_controller.h
+++ b/src/client/joystick_controller.h
@@ -149,7 +149,7 @@ public:
f32 doubling_dtime;
private:
- void setLayoutFromControllerName(std::string name);
+ void setLayoutFromControllerName(const std::string &name);
JoystickLayout m_layout;