Change returntype of pad_connection_init

This commit is contained in:
twinaphex 2015-06-13 01:40:55 +02:00
parent 8cf59bbffc
commit 123b85dbb0
5 changed files with 13 additions and 5 deletions

View File

@ -35,7 +35,7 @@ int pad_connection_find_vacant_pad(joypad_connection_t *joyconn)
return -1;
}
void *pad_connection_init(unsigned pads)
joypad_connection_t *pad_connection_init(unsigned pads)
{
int i;
joypad_connection_t *joyconn = (joypad_connection_t*)

View File

@ -49,7 +49,7 @@ int32_t pad_connection_pad_init(joypad_connection_t *joyconn,
const char* name, uint16_t vid, uint16_t pid,
void *data, send_control_t ptr);
void *pad_connection_init(unsigned pads);
joypad_connection_t *pad_connection_init(unsigned pads);
void pad_connection_destroy(joypad_connection_t *joyconn);

View File

@ -833,7 +833,10 @@ static void *btstack_hid_init(void)
if (!hid)
goto error;
hid->slots = (joypad_connection_t*)pad_connection_init(MAX_USERS);
hid->slots = pad_connection_init(MAX_USERS);
if (!hid->slots)
goto error;
return hid;

View File

@ -425,8 +425,10 @@ static void *iohidmanager_hid_init(void)
if (iohidmanager_hid_manager_set_device_matching(hid_apple) == -1)
goto error;
hid_apple->slots = (joypad_connection_t*)pad_connection_init(MAX_USERS);
hid_apple->slots = pad_connection_init(MAX_USERS);
if (!hid_apple->slots)
goto error;
return hid_apple;

View File

@ -498,7 +498,10 @@ static void *libusb_hid_init(void)
if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG))
goto error;
hid->slots = (joypad_connection_t*)pad_connection_init(MAX_USERS);
hid->slots = pad_connection_init(MAX_USERS);
if (!hid->slots)
goto error;
count = libusb_get_device_list(NULL, &devices);