add hack for remote type devices

This commit is contained in:
radius 2015-07-31 22:37:22 -05:00
parent 9b8daf02ff
commit 4097f97131

View File

@ -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") ||