(MaterialUI) Try to default to Shield color theme for Shields

This commit is contained in:
twinaphex 2016-07-25 14:27:51 +02:00
parent 58c425ef19
commit 31bcb3d6f8
3 changed files with 30 additions and 1 deletions

View File

@ -474,7 +474,12 @@ static void config_set_defaults(void)
settings->menu.xmb.shader_pipeline = menu_shader_pipeline;
settings->menu.xmb.font[0] = '\0';
#endif
settings->menu.materialui.menu_color_theme = 0;
#ifdef HAVE_MATERIALUI
settings->menu.materialui.menu_color_theme = MATERIALUI_THEME_BLUE;
if (g_defaults.menu.materialui.menu_color_theme_enable)
settings->menu.materialui.menu_color_theme = g_defaults.menu.materialui.menu_color_theme;
#endif
settings->menu.throttle_framerate = true;
settings->menu.linear_filter = true;

View File

@ -26,6 +26,18 @@
struct defaults
{
#ifdef HAVE_MENU
struct
{
struct
{
bool menu_color_theme_enable;
unsigned menu_color_theme;
} materialui;
} menu;
#endif
struct
{
char core_assets[PATH_MAX_LENGTH];

View File

@ -54,6 +54,10 @@
#include "../../verbosity.h"
#include "platform_linux.h"
#ifdef HAVE_MENU
#include "../../menu/menu_display.h"
#endif
#ifdef ANDROID
enum
{
@ -1651,7 +1655,15 @@ static void frontend_linux_get_env(int *argc,
else if (strstr(device_model, "GAMEMID_BT"))
g_defaults.settings.out_latency = 160;
else if (strstr(device_model, "SHIELD"))
{
g_defaults.settings.video_refresh_rate = 60.0;
#ifdef HAVE_MENU
#ifdef HAVE_MATERIALUI
g_defaults.menu.materialui.menu_color_theme_enable = true;
g_defaults.menu.materialui.menu_color_theme = MATERIALUI_THEME_NVIDIA_SHIELD;
#endif
#endif
}
else if (strstr(device_model, "JSS15J"))
g_defaults.settings.video_refresh_rate = 59.65;