Initial support for hotplugging mice and keyboards

This commit is contained in:
Sam Lantinga
2024-03-20 06:58:00 -07:00
parent c33e4c998d
commit 2fe1a6a279
44 changed files with 961 additions and 321 deletions

View File

@@ -81,6 +81,31 @@ typedef enum
/* Function prototypes */
/**
* Return whether a mouse is currently connected.
*
* \returns SDL_TRUE if a mouse is connected, SDL_FALSE otherwise.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetMice
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasMouse(void);
/**
* Get a list of currently connected mice.
*
* \param count a pointer filled in with the number of mice returned
* \returns a 0 terminated array of mouse instance IDs which should be
* freed with SDL_free(), or NULL on error; call SDL_GetError() for
* more details.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasMouse
*/
extern DECLSPEC SDL_MouseID *SDLCALL SDL_GetMice(int *count);
/**
* Get the window which currently has mouse focus.
*