iOS: check if mfi controller already added to the internal list when connecting

This commit is contained in:
Yoshi Sugawara 2019-02-05 06:43:14 -10:00
parent 55b449d743
commit b06d75ec99

View File

@ -182,6 +182,9 @@ static void apple_gamecontroller_joypad_connect(GCController *controller)
? desired_index : 0;
/* prevent same controller getting set twice */
if ( [mfiControllers containsObject:controller] ) {
return;
}
if (mfi_controllers[desired_index] != (uint32_t)controller.hash)
{
/* desired slot is unused, take it */