mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 22:55:33 +00:00
Fixed bug 4024 - GameController error "Unexpected controller element"
If mapping string is terminated with a comma, there is no more values to parse.
This commit is contained in:
parent
adabfdc0c5
commit
82b2c849f0
|
@ -676,8 +676,10 @@ SDL_PrivateGameControllerParseControllerConfigString(SDL_GameController *gamecon
|
|||
pchPos++;
|
||||
}
|
||||
|
||||
SDL_PrivateGameControllerParseElement(gamecontroller, szGameButton, szJoystickButton);
|
||||
|
||||
/* No more values if the string was terminated by a comma. Don't report an error. */
|
||||
if (szGameButton[0] != '\0' || szJoystickButton[0] != '\0') {
|
||||
SDL_PrivateGameControllerParseElement(gamecontroller, szGameButton, szJoystickButton);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue