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

@@ -34,6 +34,9 @@ extern SDL_SensorID SDL_GetNextSensorInstanceID(void);
extern int SDL_InitSensors(void);
extern void SDL_QuitSensors(void);
extern void SDL_LockSensors(void);
extern void SDL_UnlockSensors(void);
/* Internal event queueing functions */
extern int SDL_SendSensorUpdate(Uint64 timestamp, SDL_Sensor *sensor, Uint64 sensor_timestamp, float *data, int num_values);