mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 23:06:03 +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:
@@ -549,7 +549,7 @@ static void JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender
|
||||
device->runLoopAttached = SDL_TRUE;
|
||||
|
||||
/* Allocate an instance ID for this device */
|
||||
device->instance_id = SDL_GetNextJoystickInstanceID();
|
||||
device->instance_id = SDL_GetNextObjectID();
|
||||
|
||||
/* We have to do some storage of the io_service_t for SDL_HapticOpenFromJoystick */
|
||||
ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
|
||||
|
Reference in New Issue
Block a user