From 4097f971316b69a05f96faea76051c4c4e8df41d Mon Sep 17 00:00:00 2001 From: radius Date: Fri, 31 Jul 2015 22:37:22 -0500 Subject: [PATCH] add hack for remote type devices --- input/drivers/android_input.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index f1f75fe808..49d14dc08a 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -656,6 +656,22 @@ static void handle_hotplug(android_input_t *android, *port = 0; strlcpy(name_buf, "Generic GPIO Device", sizeof(name_buf)); } + else if (strstr(device_name, "Amazon Fire TV Remote") + || strstr(device_name, "Nexus Remote")) + { + /* hack for remote control type devices, set them always to port 0 */ + *port = 0; + strlcpy(name_buf, device_name, sizeof(name_buf)); + } + else if ( *port==1 && ( strstr(android->pad_states[0].name,"Amazon Fire TV Remote") + || strstr(android->pad_states[0].name,"Nexus Remote"))) + { + /* and then when we are binding a new controller in port 1 and one of those remotes + * was bound to port 0, bind the device as port 0 too + */ + *port = 0; + strlcpy(name_buf, device_name, sizeof(name_buf)); + } else if ( strstr(device_name, "PLAYSTATION(R)3") || strstr(device_name, "Dualshock3") ||