mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Only add platform field to love.joystick.getGamepadMappingString's result if it's not there already.
This commit is contained in:
@@ -323,7 +323,9 @@ std::string Joystick::getGamepadMappingString() const
|
||||
// Matches SDL_GameControllerAddMappingsFromRW.
|
||||
if (mappingstr.find_last_of(',') != mappingstr.length() - 1)
|
||||
mappingstr += ",";
|
||||
mappingstr += "platform:" + std::string(SDL_GetPlatform());
|
||||
|
||||
if (mappingstr.find("platform:") == std::string::npos)
|
||||
mappingstr += "platform:" + std::string(SDL_GetPlatform());
|
||||
|
||||
return mappingstr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user