(Android) When Android device is a game console, disable overlays by default

This commit is contained in:
twinaphex 2016-08-01 14:09:04 +02:00
parent ef604dbeb5
commit b126b9627d
3 changed files with 21 additions and 4 deletions

View File

@ -696,7 +696,11 @@ static void config_set_defaults(void)
sizeof(settings->network.buildbot_assets_url));
settings->network.buildbot_auto_extract_archive = true;
settings->input.overlay_enable = true;
if (g_defaults.overlay.set)
settings->input.overlay_enable = g_defaults.overlay.enable;
else
settings->input.overlay_enable = true;
settings->input.overlay_enable_autopreferred = true;
settings->input.overlay_hide_in_menu = overlay_hide_in_menu;
settings->input.overlay_opacity = 0.7f;

View File

@ -38,6 +38,12 @@ struct defaults
} menu;
#endif
struct
{
bool set;
bool enable;
} overlay;
struct
{
char core_assets[PATH_MAX_LENGTH];

View File

@ -1668,12 +1668,19 @@ static void frontend_linux_get_env(int *argc,
g_defaults.settings.video_refresh_rate = 59.65;
/* Explicitly disable input overlay by default
* for gamepad-like/console devices. */
/* For gamepad-like/console devices:
*
* - Explicitly disable input overlay by default
* - Use XMB menu driver by default
*
* */
if (device_is_game_console(device_model))
{
g_defaults.overlay.set = true;
g_defaults.overlay.enable = false;
snprintf(g_defaults.settings.menu, sizeof(g_defaults.settings.menu), "xmb");
}
#else
char base_path[PATH_MAX] = {0};
const char *xdg = getenv("XDG_CONFIG_HOME");