Merge pull request #5241 from fr500/master

fire stick & fire tv remote override hack
This commit is contained in:
Twinaphex 2017-08-04 13:49:17 +02:00 committed by GitHub
commit eff03a1fd5
3 changed files with 31 additions and 0 deletions

View File

@ -1,5 +1,8 @@
# 1.6.4 (future)
- ANDROID: Fire Stick & Fire TV remote overrides gamepad port 0 on button press and viceversa like SHIELD devices
- INPUT: input swap override flag (for remotes) is cleared correctly
# 1.6.3
- IOS: Fix GL regression - 32bit color format cores were no longer rendering
- CHEEVOS: Add support for N64 cheevos and other small fixes.

View File

@ -1072,6 +1072,32 @@ static void handle_hotplug(android_input_t *android,
}
}
/* Amazon Fire TV & Fire stick */
else if(strstr(device_model, "AFTB") || strstr(device_model, "AFTT") ||
strstr(device_model, "AFTS") || strstr(device_model, "AFTM") ||
strstr(device_model, "AFTRS"))
{
RARCH_LOG("Special Device Detected: %s\n", device_model);
{
/* always map remote to port #0 */
if (strstr(device_name, "Amazon Fire TV Remote"))
{
android->pads_connected = 0;
*port = 0;
strlcpy(name_buf, device_name, sizeof(name_buf));
}
/* remove the remote when a gamepad enters */
else if(strstr(android->pad_states[0].name,"Amazon Fire TV Remote"))
{
android->pads_connected = 0;
*port = 0;
strlcpy(name_buf, device_name, sizeof(name_buf));
}
else
strlcpy(name_buf, device_name, sizeof(name_buf));
}
}
/* Other uncommon devices
* These are mostly remote control type devices, bind them always to port 0
* And overwrite the binding whenever a controller button is pressed

View File

@ -189,6 +189,8 @@ static void input_autoconfigure_joypad_add(config_file_t *conf,
{
if (config_get_bool(conf, "input_swap_override", &tmp))
input_autoconfigure_swap_override = tmp;
else
input_autoconfigure_swap_override = false;
}
if (!block_osd_spam)