From f7c6574b37547c874adb5989d61d655664924b8c Mon Sep 17 00:00:00 2001 From: Dave Leaver Date: Fri, 16 Dec 2016 20:16:55 +1300 Subject: [PATCH] Correctly handle adding controllers if we fail to match them to the known pad_map. --- input/connect/joypad_connection.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/input/connect/joypad_connection.c b/input/connect/joypad_connection.c index f03e77161d..29d3f7a6ae 100644 --- a/input/connect/joypad_connection.c +++ b/input/connect/joypad_connection.c @@ -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;