mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Don't throw an error if the mappings passed to love.joystick.loadGamepadMappings contain mappings for other platforms but no mappings for the currently running platform.
This commit is contained in:
@@ -499,7 +499,11 @@ void JoystickModule::loadGamepadMappings(const std::string &mappings)
|
||||
std::string platform = mapping.substr(pstartpos, pendpos - pstartpos);
|
||||
|
||||
if (platform.compare(SDL_GetPlatform()) != 0)
|
||||
{
|
||||
// Ignore the mapping but still acknowledge that it is one.
|
||||
success = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
pstartpos -= strlen("platform:");
|
||||
mapping.erase(pstartpos, pendpos - pstartpos + 1);
|
||||
|
||||
Reference in New Issue
Block a user