Add error returns to void functions that can fail/set errors.
This takes care of the last set of void functions that could potentially be shifted to instead return an int indicating success and setting an error in case of an error.
This commit is contained in:
committed by
Sam Lantinga
parent
b305d9e3c0
commit
3bd737d44c
@@ -537,10 +537,12 @@ extern DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad);
|
||||
* \param gamepad the gamepad object to adjust.
|
||||
* \param player_index Player index to assign to this gamepad, or -1 to clear
|
||||
* the player index and turn off player LEDs.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, int player_index);
|
||||
extern DECLSPEC int SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, int player_index);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened gamepad, if available.
|
||||
|
||||
Reference in New Issue
Block a user