From 19cf3890d52784f4540a4fbe81dccfe1b3e553a6 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Thu, 18 Jun 2020 10:54:38 +0800 Subject: [PATCH] INI option to disable logo in Menu core. --- MiSTer.ini | 3 +++ cfg.cpp | 2 ++ cfg.h | 1 + video.cpp | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/MiSTer.ini b/MiSTer.ini index 07a3b2a..fe38ea3 100644 --- a/MiSTer.ini +++ b/MiSTer.ini @@ -116,3 +116,6 @@ sniper_mode=0 ; Uncomment following option if you don't want to see a second line for long file names in listing. ;browse_expand=0 + +; 0 - disable MiSTer logo in Menu core +logo=1 diff --git a/cfg.cpp b/cfg.cpp index d9ff34e..2c33864 100644 --- a/cfg.cpp +++ b/cfg.cpp @@ -70,6 +70,7 @@ static const ini_var_t ini_vars[] = { "JAMMA_PID", (void*)(&(cfg.jamma_pid)), UINT16, 0, 0xFFFF }, { "SNIPER_MODE", (void*)(&(cfg.sniper_mode)), UINT8, 0, 1 }, { "BROWSE_EXPAND", (void*)(&(cfg.browse_expand)), UINT8, 0, 1 }, + { "LOGO", (void*)(&(cfg.logo)), UINT8, 0, 1 }, }; static const int nvars = (int)(sizeof(ini_vars) / sizeof(ini_var_t)); @@ -315,5 +316,6 @@ void cfg_parse() cfg.fb_terminal = 1; cfg.controller_info = 6; cfg.browse_expand = 1; + cfg.logo = 1; ini_parse(altcfg()); } diff --git a/cfg.h b/cfg.h index 9c3a5e9..b8d02b1 100644 --- a/cfg.h +++ b/cfg.h @@ -44,6 +44,7 @@ typedef struct { uint16_t jamma_pid; uint8_t sniper_mode; uint8_t browse_expand; + uint8_t logo; char bootcore[256]; char video_conf[1024]; char video_conf_pal[1024]; diff --git a/video.cpp b/video.cpp index 9cbb0e1..17cfd51 100644 --- a/video.cpp +++ b/video.cpp @@ -1271,7 +1271,7 @@ void video_menu_bg(int n, int idle) break; } - if (logo && !idle) + if (cfg.logo && logo && !idle) { imlib_context_set_image(logo);