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:
Alex Szpakowski
2018-02-07 22:32:06 -04:00
parent a361b5c330
commit 53872d813a
+3 -1
View File
@@ -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.");
}