mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
improve shield portable hack
This commit is contained in:
parent
996bb990a0
commit
d70d04c473
@ -949,13 +949,10 @@ static void handle_hotplug(android_input_t *android,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NVIDIA Shield Portable
|
|
||||||
* This is a simple hack, basically groups the "back"
|
|
||||||
* button with the rest of the gamepad
|
|
||||||
*/
|
|
||||||
else if(strstr(device_model, "SHIELD") && (
|
else if(strstr(device_model, "SHIELD") && (
|
||||||
strstr(device_name, "Virtual") || strstr(device_name, "gpio") ||
|
strstr(device_name, "Virtual") || strstr(device_name, "gpio") ||
|
||||||
strstr(device_name, "NVIDIA Corporation NVIDIA Controller v01.01")))
|
strstr(device_name, "NVIDIA Corporation NVIDIA Controller v01.01") ||
|
||||||
|
strstr(device_name, "NVIDIA Corporation NVIDIA Controller v01.02")))
|
||||||
{
|
{
|
||||||
/* only use the hack if the device is one of the built-in devices */
|
/* only use the hack if the device is one of the built-in devices */
|
||||||
RARCH_LOG("Special Device Detected: %s\n", device_model);
|
RARCH_LOG("Special Device Detected: %s\n", device_model);
|
||||||
@ -967,10 +964,28 @@ static void handle_hotplug(android_input_t *android,
|
|||||||
|
|
||||||
if ( pad_id2 > 0)
|
if ( pad_id2 > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
strlcpy (name_buf, "NVIDIA SHIELD Portable", sizeof(name_buf));
|
strlcpy (name_buf, "NVIDIA SHIELD Portable", sizeof(name_buf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(strstr(device_model, "SHIELD") && (
|
||||||
|
strstr(device_name, "Virtual") || strstr(device_name, "gpio") ||
|
||||||
|
strstr(device_name, "NVIDIA Corporation NVIDIA Controller v01.03")))
|
||||||
|
{
|
||||||
|
/* only use the hack if the device is one of the built-in devices */
|
||||||
|
RARCH_LOG("Special Device Detected: %s\n", device_model);
|
||||||
|
{
|
||||||
|
if (strstr(device_name, "NVIDIA Corporation NVIDIA Controller v01.03")
|
||||||
|
&& android->pads_connected==0)
|
||||||
|
pad_id1 = id;
|
||||||
|
else if (strstr(device_name, "Virtual") || strstr(device_name, "gpio"))
|
||||||
|
{
|
||||||
|
id = pad_id1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
strlcpy (name_buf, "NVIDIA SHIELD Gamepad", sizeof(name_buf));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Other ATV Devices
|
/* Other ATV Devices
|
||||||
* Add other common ATV devices that will follow the Android
|
* Add other common ATV devices that will follow the Android
|
||||||
|
Loading…
x
Reference in New Issue
Block a user