mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
(libusb) Start allocating and freeing joypad connections
This commit is contained in:
parent
79431fcc7e
commit
0fa5fd91dd
@ -239,6 +239,8 @@ static void libusb_hid_free(void *data)
|
|||||||
{
|
{
|
||||||
libusb_hid_t *hid = (libusb_hid_t*)data;
|
libusb_hid_t *hid = (libusb_hid_t*)data;
|
||||||
|
|
||||||
|
pad_connection_destroy(hid->slots);
|
||||||
|
|
||||||
while(adapters.next)
|
while(adapters.next)
|
||||||
remove_adapter(hid, adapters.next->device);
|
remove_adapter(hid, adapters.next->device);
|
||||||
|
|
||||||
@ -297,6 +299,8 @@ static void *libusb_hid_init(void)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hid->slots = (joypad_connection_t*)pad_connection_init(MAX_USERS);
|
||||||
|
|
||||||
return hid;
|
return hid;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user