Exposed SDL_ResetKeyboard() as a public function

This will be used by Source 2 titles to reset keyboard state before showing assertion dialogs
This commit is contained in:
Sam Lantinga
2022-07-11 09:49:00 -07:00
parent 739155c44c
commit 2373da5d94
5 changed files with 15 additions and 3 deletions

View File

@@ -90,9 +90,21 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_PumpEvents
* \sa SDL_ResetKeyboard
*/
extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
/**
* Clear the state of the keyboard
*
* This function will generate key up events for all pressed keys.
*
* \since This function is available since SDL 2.24.0.
*
* \sa SDL_GetKeyboardState
*/
extern DECLSPEC void SDLCALL SDL_ResetKeyboard(void);
/**
* Get the current key modifier state for the keyboard.
*