Fix always using the xbox layout (reported by coverity).

This commit is contained in:
Ekdohibs 2017-04-18 06:40:53 +02:00
parent 5433e9bd19
commit eddf16eee9
1 changed files with 1 additions and 1 deletions

View 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();