Changed return -1 after SDL_SetError() to return SDL_SetError().
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 25 Dec 2013 17:02:15 +0100
changeset 8081402b8c313246
parent 8080 bf767de0bcdc
child 8082 5b83ad3f01ac
Changed return -1 after SDL_SetError() to return SDL_SetError().
src/joystick/SDL_gamecontroller.c
     1.1 --- a/src/joystick/SDL_gamecontroller.c	Wed Dec 25 16:57:59 2013 +0100
     1.2 +++ b/src/joystick/SDL_gamecontroller.c	Wed Dec 25 17:02:15 2013 +0100
     1.3 @@ -743,8 +743,7 @@
     1.4  
     1.5      pchGUID = SDL_PrivateGetControllerGUIDFromMappingString( mappingString );
     1.6      if (!pchGUID) {
     1.7 -        SDL_SetError("Couldn't parse GUID from %s", mappingString);
     1.8 -        return -1;
     1.9 +        return SDL_SetError("Couldn't parse GUID from %s", mappingString);
    1.10      }
    1.11  #ifdef SDL_JOYSTICK_DINPUT
    1.12      if ( !SDL_strcasecmp( pchGUID, "xinput" ) ) {
    1.13 @@ -756,15 +755,13 @@
    1.14  
    1.15      pchName = SDL_PrivateGetControllerNameFromMappingString( mappingString );
    1.16      if (!pchName) {
    1.17 -        SDL_SetError("Couldn't parse name from %s", mappingString);
    1.18 -        return -1;
    1.19 +        return SDL_SetError("Couldn't parse name from %s", mappingString);
    1.20      }
    1.21  
    1.22      pchMapping = SDL_PrivateGetControllerMappingFromMappingString( mappingString );
    1.23      if (!pchMapping) {
    1.24 -        SDL_SetError("Couldn't parse %s", mappingString);
    1.25          SDL_free( pchName );
    1.26 -        return -1;
    1.27 +        return SDL_SetError("Couldn't parse %s", mappingString);
    1.28      }
    1.29  
    1.30      pControllerMapping = SDL_PrivateGetControllerMappingForGUID(&jGUID);