mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Fix always using the xbox layout (reported by coverity).
This commit is contained in:
parent
5433e9bd19
commit
eddf16eee9
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user