Added a single source of SDL object IDs

This ensures that we don't accidentally interpret an ID from one system as an ID in another system.
Audio device IDs are not covered here, since they have a unique numbering system.
This commit is contained in:
Sam Lantinga committed 2023-10-23 10:49:37 -07:00
1 parent e07f6c0a17
commit 38afd48daf
23 files changed
+37 -50

No files matched your search

+1 -1
View File
@@ -315,7 +315,7 @@ static int ConnectSensor(ISensor *sensor)
++SDL_num_sensors;
SDL_zerop(new_sensor);
new_sensor->id = SDL_GetNextSensorInstanceID();
new_sensor->id = SDL_GetNextObjectID();
new_sensor->sensor = sensor;
new_sensor->type = type;
new_sensor->name = name;