mirror of
https://github.com/love2d/love.git
synced 2026-08-18 19:54:22 +02:00
Don't error when love.joystick.loadGamepadMappings is given an empty string/file, since saveGamepadMappings can produce that. Resolves issue #1375.
This commit is contained in:
@@ -432,7 +432,9 @@ void JoystickModule::loadGamepadMappings(const std::string &mappings)
|
||||
}
|
||||
}
|
||||
|
||||
if (!success)
|
||||
// Don't error when an empty string is given, since saveGamepadMappings can
|
||||
// produce an empty string if there are no recently seen gamepads to save.
|
||||
if (!success && !mappings.empty())
|
||||
throw love::Exception("Invalid gamepad mappings.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user