diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp index e6a572ad..3e144279 100644 --- a/src/client/joystick_controller.cpp +++ b/src/client/joystick_controller.cpp @@ -186,7 +186,7 @@ void JoystickController::onJoystickConnect(const std::vector } 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();