Make SDL_SetError and friends unconditionally return -1.
This lets us change things like this... if (Failed) { SDL_SetError("We failed"); return -1; } ...into this... if (Failed) { return SDL_SetError("We failed"); } Fixes Bugzilla #1778.
This commit is contained in:
parent
8c6b9f4743
commit
4f438b70a2
106 changed files with 616 additions and 1189 deletions
|
@ -722,10 +722,9 @@ SDL_GameControllerAddMapping( const char *mappingString )
|
|||
} else {
|
||||
pControllerMapping = SDL_malloc( sizeof(*pControllerMapping) );
|
||||
if (!pControllerMapping) {
|
||||
SDL_OutOfMemory();
|
||||
SDL_free( pchName );
|
||||
SDL_free( pchMapping );
|
||||
return -1;
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
#ifdef SDL_JOYSTICK_DINPUT
|
||||
if ( is_xinput_mapping )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue