mirror of
https://github.com/love2d/love.git
synced 2026-08-21 13:09:56 +02:00
Fixed some logic
This commit is contained in:
@@ -495,10 +495,10 @@ void JoystickModule::loadGamepadMappings(const std::string &mappings)
|
|||||||
mapping.erase(pstartpos, pendpos - pstartpos + 1);
|
mapping.erase(pstartpos, pendpos - pstartpos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
success = success || (SDL_GameControllerAddMapping(mapping.c_str()) != -1);
|
if (SDL_GameControllerAddMapping(mapping.c_str()) != -1)
|
||||||
|
|
||||||
if (success)
|
|
||||||
{
|
{
|
||||||
|
success = true;
|
||||||
|
|
||||||
// FIXME: massive hack until missing APIs are added to SDL 2:
|
// FIXME: massive hack until missing APIs are added to SDL 2:
|
||||||
// https://bugzilla.libsdl.org/show_bug.cgi?id=1975
|
// https://bugzilla.libsdl.org/show_bug.cgi?id=1975
|
||||||
std::string guid = mapping.substr(0, mapping.find_first_of(','));
|
std::string guid = mapping.substr(0, mapping.find_first_of(','));
|
||||||
|
|||||||
Reference in New Issue
Block a user