Removed SDL_HasGamepads(), SDL_HasJoysticks(), and SDL_HasSensors()

Also cleaned up logic for whether we need to poll for events:
- We need to periodically poll for joysticks to handle hotplug.
- We need to frequently poll for joysticks and sensors when they're open so their state can be updated
This commit is contained in:
Sam Lantinga
2022-12-29 23:07:30 -08:00
parent 7f23d71b6a
commit 324c0b76a0
15 changed files with 64 additions and 153 deletions

View File

@@ -274,17 +274,6 @@ extern DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_JoystickGUID gui
*/
extern DECLSPEC char * SDLCALL SDL_GetGamepadMapping(SDL_Gamepad *gamepad);
/**
* Return whether there are gamepads connected
*
* \returns SDL_TRUE if there are gamepads connected, SDL_FALSE otherwise.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepads
*/
extern DECLSPEC SDL_bool SDLCALL SDL_HasGamepads(void);
/**
* Get a list of currently connected gamepads.
*