mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
(Android) Use strstr for detecting devices by name
This commit is contained in:
parent
195520fcb6
commit
4456cb85f6
@ -857,11 +857,11 @@ static void frontend_android_get_version_sdk(int32_t *sdk)
|
|||||||
static bool device_is_xperia_play(const char *name)
|
static bool device_is_xperia_play(const char *name)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
string_is_equal(name, "R800x") ||
|
strstr(name, "R800x") ||
|
||||||
string_is_equal(name, "R800at") ||
|
strstr(name, "R800at") ||
|
||||||
string_is_equal(name, "R800i") ||
|
strstr(name, "R800i") ||
|
||||||
string_is_equal(name, "R800a") ||
|
strstr(name, "R800a") ||
|
||||||
string_is_equal(name, "SO-01D")
|
strstr(name, "SO-01D")
|
||||||
)
|
)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -871,11 +871,11 @@ static bool device_is_xperia_play(const char *name)
|
|||||||
static bool device_is_game_console(const char *name)
|
static bool device_is_game_console(const char *name)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
string_is_equal(name, "OUYA Console") ||
|
strstr(name, "OUYA Console") ||
|
||||||
device_is_xperia_play(name) ||
|
device_is_xperia_play(name) ||
|
||||||
string_is_equal(name, "GAMEMID_BT") ||
|
strstr(name, "GAMEMID_BT") ||
|
||||||
string_is_equal(name, "S7800") ||
|
strstr(name, "S7800") ||
|
||||||
string_is_equal(name, "SHIELD")
|
strstr(name, "SHIELD")
|
||||||
)
|
)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -1407,9 +1407,9 @@ static int frontend_linux_get_rating(void)
|
|||||||
|
|
||||||
if (device_is_xperia_play(device_model))
|
if (device_is_xperia_play(device_model))
|
||||||
return 6;
|
return 6;
|
||||||
else if (string_is_equal(device_model, "GT-I9505"))
|
else if (strstr(device_model, "GT-I9505"))
|
||||||
return 12;
|
return 12;
|
||||||
else if (string_is_equal(device_model, "SHIELD"))
|
else if (strstr(device_model, "SHIELD"))
|
||||||
return 13;
|
return 13;
|
||||||
#endif
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
@ -1920,11 +1920,11 @@ static void frontend_linux_get_env(int *argc,
|
|||||||
g_defaults.settings.video_refresh_rate = 59.19132938771038;
|
g_defaults.settings.video_refresh_rate = 59.19132938771038;
|
||||||
g_defaults.settings.video_threaded_enable = false;
|
g_defaults.settings.video_threaded_enable = false;
|
||||||
}
|
}
|
||||||
else if (string_is_equal(device_model, "GAMEMID_BT"))
|
else if (strstr(device_model, "GAMEMID_BT"))
|
||||||
g_defaults.settings.out_latency = 160;
|
g_defaults.settings.out_latency = 160;
|
||||||
else if (string_is_equal(device_model, "SHIELD"))
|
else if (strstr(device_model, "SHIELD"))
|
||||||
g_defaults.settings.video_refresh_rate = 60.0;
|
g_defaults.settings.video_refresh_rate = 60.0;
|
||||||
else if (string_is_equal(device_model, "JSS15J"))
|
else if (strstr(device_model, "JSS15J"))
|
||||||
g_defaults.settings.video_refresh_rate = 59.65;
|
g_defaults.settings.video_refresh_rate = 59.65;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
Reference in New Issue
Block a user