mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 07:20:34 +00:00
(Android) Add better Xperia Play detection
This commit is contained in:
parent
cd049bde2b
commit
23e95d9064
@ -413,11 +413,25 @@ static void frontend_android_get_name(char *name, size_t sizeof_name)
|
|||||||
(void)len;
|
(void)len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool device_is_xperia_play(const char *name)
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
!strcmp(name, "R800x") ||
|
||||||
|
!strcmp(name, "R800at") ||
|
||||||
|
!strcmp(name, "R800i") ||
|
||||||
|
!strcmp(name, "R800a") ||
|
||||||
|
!strcmp(name, "SO-01D")
|
||||||
|
)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static bool device_is_game_console(const char *name)
|
static bool device_is_game_console(const char *name)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
!strcmp(name, "OUYA Console") ||
|
!strcmp(name, "OUYA Console") ||
|
||||||
!strcmp(name, "R800x") ||
|
device_is_xperia_play(name) ||
|
||||||
!strcmp(name, "GAMEMID_BT") ||
|
!strcmp(name, "GAMEMID_BT") ||
|
||||||
!strcmp(name, "SHIELD")
|
!strcmp(name, "SHIELD")
|
||||||
)
|
)
|
||||||
@ -426,6 +440,7 @@ static bool device_is_game_console(const char *name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void frontend_android_get_environment_settings(int *argc, char *argv[],
|
static void frontend_android_get_environment_settings(int *argc, char *argv[],
|
||||||
void *data, void *params_data)
|
void *data, void *params_data)
|
||||||
{
|
{
|
||||||
@ -570,8 +585,7 @@ static void frontend_android_get_environment_settings(int *argc, char *argv[],
|
|||||||
g_defaults.settings.video_threaded_enable = true;
|
g_defaults.settings.video_threaded_enable = true;
|
||||||
|
|
||||||
// Set automatic default values per device
|
// Set automatic default values per device
|
||||||
if (!strcmp(device_model, "SHIELD")) { }
|
if (device_is_xperia_play(device_model))
|
||||||
else if (!strcmp(device_model, "R800x"))
|
|
||||||
{
|
{
|
||||||
g_defaults.settings.out_latency = 128;
|
g_defaults.settings.out_latency = 128;
|
||||||
g_defaults.settings.video_refresh_rate = 59.19132938771038;
|
g_defaults.settings.video_refresh_rate = 59.19132938771038;
|
||||||
@ -785,7 +799,7 @@ static int frontend_android_get_rating(void)
|
|||||||
|
|
||||||
RARCH_LOG("ro.product.model: (%s).\n", device_model);
|
RARCH_LOG("ro.product.model: (%s).\n", device_model);
|
||||||
|
|
||||||
if (!strcmp(device_model, "R800x"))
|
if (device_is_xperia_play(device_model))
|
||||||
return 6;
|
return 6;
|
||||||
else if (!strcmp(device_model, "GT-I9505"))
|
else if (!strcmp(device_model, "GT-I9505"))
|
||||||
return 12;
|
return 12;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user