mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-25 07:25:36 +00:00
Changed return -1 after SDL_SetError() to return SDL_SetError().
This commit is contained in:
parent
87ad7a1c50
commit
54a1f61a17
|
@ -743,8 +743,7 @@ SDL_GameControllerAddMapping( const char *mappingString )
|
||||||
|
|
||||||
pchGUID = SDL_PrivateGetControllerGUIDFromMappingString( mappingString );
|
pchGUID = SDL_PrivateGetControllerGUIDFromMappingString( mappingString );
|
||||||
if (!pchGUID) {
|
if (!pchGUID) {
|
||||||
SDL_SetError("Couldn't parse GUID from %s", mappingString);
|
return SDL_SetError("Couldn't parse GUID from %s", mappingString);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
#ifdef SDL_JOYSTICK_DINPUT
|
#ifdef SDL_JOYSTICK_DINPUT
|
||||||
if ( !SDL_strcasecmp( pchGUID, "xinput" ) ) {
|
if ( !SDL_strcasecmp( pchGUID, "xinput" ) ) {
|
||||||
|
@ -756,15 +755,13 @@ SDL_GameControllerAddMapping( const char *mappingString )
|
||||||
|
|
||||||
pchName = SDL_PrivateGetControllerNameFromMappingString( mappingString );
|
pchName = SDL_PrivateGetControllerNameFromMappingString( mappingString );
|
||||||
if (!pchName) {
|
if (!pchName) {
|
||||||
SDL_SetError("Couldn't parse name from %s", mappingString);
|
return SDL_SetError("Couldn't parse name from %s", mappingString);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pchMapping = SDL_PrivateGetControllerMappingFromMappingString( mappingString );
|
pchMapping = SDL_PrivateGetControllerMappingFromMappingString( mappingString );
|
||||||
if (!pchMapping) {
|
if (!pchMapping) {
|
||||||
SDL_SetError("Couldn't parse %s", mappingString);
|
|
||||||
SDL_free( pchName );
|
SDL_free( pchName );
|
||||||
return -1;
|
return SDL_SetError("Couldn't parse %s", mappingString);
|
||||||
}
|
}
|
||||||
|
|
||||||
pControllerMapping = SDL_PrivateGetControllerMappingForGUID(&jGUID);
|
pControllerMapping = SDL_PrivateGetControllerMappingForGUID(&jGUID);
|
||||||
|
|
Loading…
Reference in a new issue