mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-27 21:48:29 +00:00
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:
@@ -378,7 +378,7 @@ int Android_AddJoystick(int device_id, const char *name, const char *desc, int v
|
||||
}
|
||||
item->naxes = naxes;
|
||||
item->nhats = nhats;
|
||||
item->device_instance = SDL_GetNextJoystickInstanceID();
|
||||
item->device_instance = SDL_GetNextObjectID();
|
||||
if (SDL_joylist_tail == NULL) {
|
||||
SDL_joylist = SDL_joylist_tail = item;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user