summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorEkdohibs <nathanael.courant@laposte.net>2017-04-18 06:40:53 +0200
committerEkdohibs <nathanael.courant@laposte.net>2017-04-18 06:47:08 +0200
commiteddf16eee9cb3627f4f62d37ea2942fc7546fae7 (patch)
treefadc3a586a3cfa7fc70d1017fb737ba14891ee14 /src/client
parent5433e9bd19b9c3a42f8db569bf8f47d6dbe4f0c5 (diff)
downloadminetest-eddf16eee9cb3627f4f62d37ea2942fc7546fae7.tar.gz
minetest-eddf16eee9cb3627f4f62d37ea2942fc7546fae7.tar.bz2
minetest-eddf16eee9cb3627f4f62d37ea2942fc7546fae7.zip
Fix always using the xbox layout (reported by coverity).
Diffstat (limited to 'src/client')
-rw-r--r--src/client/joystick_controller.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp
index e6a572adb..3e1442793 100644
--- a/src/client/joystick_controller.cpp
+++ b/src/client/joystick_controller.cpp
@@ -186,7 +186,7 @@ void JoystickController::onJoystickConnect(const std::vector<irr::SJoystickInfo>
}
void JoystickController::setLayoutFromControllerName(std::string name) {
- if (lowercase(name).find("xbox") >= 0) {
+ if (lowercase(name).find("xbox") != std::string::npos) {
m_layout = create_xbox_layout();
} else {
m_layout = create_default_layout();