]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix always using the xbox layout (reported by coverity).
authorEkdohibs <nathanael.courant@laposte.net>
Tue, 18 Apr 2017 04:40:53 +0000 (06:40 +0200)
committerEkdohibs <nathanael.courant@laposte.net>
Tue, 18 Apr 2017 04:47:08 +0000 (06:47 +0200)
src/client/joystick_controller.cpp

index e6a572adbee17313343427fa55407fcd3f0a77f7..3e1442793f680f0d98d532e416e402b7f7925ebd 100644 (file)
@@ -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();