From aad2df7f0d140448c0bc729600dbcd54bffb976b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 9 Aug 2022 08:47:49 -0700 Subject: [PATCH] Document passing -1 to clear the player index for a controller --- include/SDL_gamecontroller.h | 2 +- include/SDL_joystick.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/SDL_gamecontroller.h b/include/SDL_gamecontroller.h index 00f08d34a..dec675c88 100644 --- a/include/SDL_gamecontroller.h +++ b/include/SDL_gamecontroller.h @@ -455,7 +455,7 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController * Set the player index of an opened game controller. * * \param gamecontroller the game controller object to adjust. - * \param player_index Player index to assign to this controller. + * \param player_index Player index to assign to this controller, or -1 to clear the player index and turn off player LEDs. * * \since This function is available since SDL 2.0.12. */ diff --git a/include/SDL_joystick.h b/include/SDL_joystick.h index 60bd470f8..69b3ccdd5 100644 --- a/include/SDL_joystick.h +++ b/include/SDL_joystick.h @@ -514,7 +514,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick); * Set the player index of an opened joystick. * * \param joystick the SDL_Joystick obtained from SDL_JoystickOpen() - * \param player_index the player index to set. + * \param player_index Player index to assign to this joystick, or -1 to clear the player index and turn off player LEDs. * * \since This function is available since SDL 2.0.12. */