Added SDL_ReloadGamepadMappings() to reset the SDL gamepad mappings

This commit is contained in:
Sam Lantinga
2023-07-18 12:50:10 -07:00
parent 75e7a6fcfa
commit 9db2cb3513
6 changed files with 83 additions and 38 deletions

View File

@@ -213,6 +213,18 @@ extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromRW(SDL_RWops *src, int fre
*/
extern DECLSPEC int SDLCALL SDL_AddGamepadMappingsFromFile(const char *file);
/**
* Reinitialize the SDL mapping database to its initial state.
*
* This will generate gamepad events as needed if device mappings change.
*
* \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 int SDLCALL SDL_ReloadGamepadMappings(void);
/**
* Get the number of mappings installed.
*