Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix always using the xbox layout (reported by coverity).
  • Loading branch information
Ekdohibs committed Apr 18, 2017
1 parent 5433e9b commit eddf16e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/joystick_controller.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit eddf16e

Please sign in to comment.