Correctly handle adding controllers if we fail to match them to the known pad_map.

This commit is contained in:
Dave Leaver 2016-12-16 20:16:55 +13:00
parent 0b1a265675
commit f7c6574b37

View File

@ -116,6 +116,14 @@ int32_t pad_connection_pad_init(joypad_connection_t *joyconn,
break;
}
}
//We failed to find a matching pad, set up one without an iface
if (!s->connected)
{
s->iface = NULL;
s->data = data;
s->connected = true;
}
}
return pad;