Use SDL_bool where appropriate in SDL events

This involved changing button state from Uint8 to SDL_bool, and made SDL_PRESSED and SDL_RELEASED unnecessary.

Fixes https://github.com/libsdl-org/SDL/issues/10069
This commit is contained in:
Sam Lantinga 2024-09-09 09:18:02 -07:00
parent 7d1bbae6b2
commit 6fc6e3dc7e
89 changed files with 935 additions and 956 deletions

View file

@ -119,8 +119,8 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
* valid for the whole lifetime of the application and should not be freed by
* the caller.
*
* A array element with a value of 1 means that the key is pressed and a value
* of 0 means that it is not. Indexes into this array are obtained by using
* A array element with a value of SDL_TRUE means that the key is pressed and a value
* of SDL_FALSE means that it is not. Indexes into this array are obtained by using
* SDL_Scancode values.
*
* Use SDL_PumpEvents() to update the state array.
@ -141,7 +141,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
* \sa SDL_PumpEvents
* \sa SDL_ResetKeyboard
*/
extern SDL_DECLSPEC const Uint8 * SDLCALL SDL_GetKeyboardState(int *numkeys);
extern SDL_DECLSPEC const SDL_bool * SDLCALL SDL_GetKeyboardState(int *numkeys);
/**
* Clear the state of the keyboard.