mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 09:57:40 +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:
parent
e07f6c0a17
commit
38afd48daf
23 changed files with 37 additions and 50 deletions
|
@ -237,7 +237,7 @@ SDL_JoystickID SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *des
|
|||
}
|
||||
|
||||
/* Allocate an instance ID for this device */
|
||||
hwdata->instance_id = SDL_GetNextJoystickInstanceID();
|
||||
hwdata->instance_id = SDL_GetNextObjectID();
|
||||
|
||||
/* Add virtual joystick to SDL-global lists */
|
||||
if (g_VJoys) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue