Updated gamepad, joystick, sensor APIs, removing device indices

Instead of indexing into an internal list of devices which requires locking, we return a list of device IDs which can then be queried individually.

Reference: https://github.com/libsdl-org/SDL/issues/6889
This commit is contained in:
Sam Lantinga
2022-12-27 18:10:06 -08:00
parent e40a96155f
commit 16092f58bb
27 changed files with 917 additions and 797 deletions

View File

@@ -109,7 +109,7 @@ struct SDL_Joystick
Uint64 led_expiration _guarded;
SDL_bool attached _guarded;
SDL_bool is_game_controller _guarded;
SDL_bool is_gamepad _guarded;
SDL_bool delayed_guide_button _guarded; /* SDL_TRUE if this device has the guide button event delayed */
SDL_JoystickPowerLevel epowerlevel _guarded; /* power level of this joystick, SDL_JOYSTICK_POWER_UNKNOWN if not supported */