From ee421fcaa8a59cd04afcc98dd6743ae28d9fd78b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 24 Apr 2018 16:01:51 +0200 Subject: [PATCH] Add RGUI Border Filler Enable --- configuration.c | 3 +++ configuration.h | 1 + intl/msg_hash_ar.h | 2 ++ intl/msg_hash_chs.h | 2 ++ intl/msg_hash_cht.h | 2 ++ intl/msg_hash_de.h | 2 ++ intl/msg_hash_eo.h | 2 ++ intl/msg_hash_es.h | 2 ++ intl/msg_hash_fr.h | 2 ++ intl/msg_hash_it.h | 2 ++ intl/msg_hash_ja.h | 2 ++ intl/msg_hash_ko.h | 2 ++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 2 ++ intl/msg_hash_pl.h | 2 ++ intl/msg_hash_pt_br.h | 2 ++ intl/msg_hash_pt_pt.h | 2 ++ intl/msg_hash_ru.h | 2 ++ intl/msg_hash_us.h | 2 ++ intl/msg_hash_vn.h | 2 ++ menu/drivers/rgui.c | 41 +++++++++++++++++++++++++---------------- menu/menu_displaylist.c | 4 ++++ menu/menu_setting.c | 16 ++++++++++++++++ msg_hash.h | 1 + 24 files changed, 86 insertions(+), 16 deletions(-) diff --git a/configuration.c b/configuration.c index bfd2615f37..522bcef290 100644 --- a/configuration.c +++ b/configuration.c @@ -1331,6 +1331,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif +#ifdef HAVE_RGUI + SETTING_BOOL("rgui_border_filler_enable", &settings->bools.menu_rgui_border_filler_enable, true, true, false); +#endif #ifdef HAVE_XMB SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, xmb_shadows_enable, false); SETTING_BOOL("xmb_vertical_thumbnails", &settings->bools.menu_xmb_vertical_thumbnails, true, xmb_vertical_thumbnails, false); diff --git a/configuration.h b/configuration.h index 890973086c..97fb7249c9 100644 --- a/configuration.h +++ b/configuration.h @@ -148,6 +148,7 @@ typedef struct settings bool menu_show_quit_retroarch; bool menu_show_reboot; bool menu_materialui_icons_enable; + bool menu_rgui_border_filler_enable; bool menu_xmb_shadows_enable; bool menu_xmb_vertical_thumbnails; bool menu_content_show_settings; diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index ac772516dc..ecb9d5c5d6 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -3435,3 +3435,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 6e6f0155a8..c7ed79c00a 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3221,3 +3221,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 695095e7bd..bd29173ff5 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3213,3 +3213,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 1c7c9afee0..eaf90f6b40 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3327,3 +3327,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index b2e52d50ee..018e802a54 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -3086,3 +3086,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index 637a8179ec..7633418c99 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -5817,3 +5817,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 12c5f97c06..65f57c3dcc 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3251,3 +3251,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index fcf6b070bf..dbc83f8fb7 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3309,3 +3309,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Mostra statistiche") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Mostra statistiche tecniche su schermo.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 3562981f0b..635c8ae8ec 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3325,3 +3325,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 875cbbf201..e36cbd02a5 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3212,3 +3212,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index cd2485fafa..c463f48355 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1473,3 +1473,5 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_DRIVER_LINUXRAW, "linuxraw") MSG_HASH(MENU_ENUM_LABEL_VIDEO_WINDOW_SHOW_DECORATIONS, "video_window_show_decorations") +MSG_HASH(MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_ENABLE, + "menu_rgui_border_filler_enable") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 3501262f53..e05d9964eb 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -3088,3 +3088,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index b43111f30e..56575412e9 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -3447,3 +3447,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Wyświetl statystyki") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Pokaż techniczne statystyki na ekranie.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index f819763186..c8c88335b2 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4316,3 +4316,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Exibir estatísticas") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Mostrar estatísticas técnicas na tela.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index ca37f48512..2e8fee43ba 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3186,3 +3186,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 9f045d4b3d..7807f3856c 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3270,3 +3270,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 02a1eee6b4..0884f06788 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3491,3 +3491,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 971c4408cd..25fb749e51 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3243,3 +3243,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Display Statistics") MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Show onscreen technical statistics.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + "Enable border filler") diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 16de9c2c43..8ea1841554 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -263,12 +263,17 @@ static void rgui_render_background(void) if (rgui_framebuf_data) { - rgui_fill_rect(rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5, rgui_green_filler); - rgui_fill_rect(rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5, rgui_green_filler); + settings_t *settings = config_get_ptr(); - rgui_fill_rect(rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10, rgui_green_filler); - rgui_fill_rect(rgui_framebuf_data, fb_pitch, fb_width - 10, 5, 5, fb_height - 10, - rgui_green_filler); + if (settings->bools.menu_rgui_border_filler_enable) + { + rgui_fill_rect(rgui_framebuf_data, fb_pitch, 5, 5, fb_width - 10, 5, rgui_green_filler); + rgui_fill_rect(rgui_framebuf_data, fb_pitch, 5, fb_height - 10, fb_width - 10, 5, rgui_green_filler); + + rgui_fill_rect(rgui_framebuf_data, fb_pitch, 5, 5, 5, fb_height - 10, rgui_green_filler); + rgui_fill_rect(rgui_framebuf_data, fb_pitch, fb_width - 10, 5, 5, fb_height - 10, + rgui_green_filler); + } } } @@ -341,17 +346,21 @@ static void rgui_render_messagebox(const char *message) rgui_fill_rect(rgui_framebuf_data, fb_pitch, x + 5, y + 5, width - 10, height - 10, rgui_gray_filler); - rgui_fill_rect(rgui_framebuf_data, - fb_pitch, x, y, width - 5, 5, rgui_green_filler); - rgui_fill_rect(rgui_framebuf_data, - fb_pitch, x + width - 5, y, 5, - height - 5, rgui_green_filler); - rgui_fill_rect(rgui_framebuf_data, - fb_pitch, x + 5, y + height - 5, - width - 5, 5, rgui_green_filler); - rgui_fill_rect(rgui_framebuf_data, - fb_pitch, x, y + 5, 5, - height - 5, rgui_green_filler); + + if (settings->bools.menu_rgui_border_filler_enable) + { + rgui_fill_rect(rgui_framebuf_data, + fb_pitch, x, y, width - 5, 5, rgui_green_filler); + rgui_fill_rect(rgui_framebuf_data, + fb_pitch, x + width - 5, y, 5, + height - 5, rgui_green_filler); + rgui_fill_rect(rgui_framebuf_data, + fb_pitch, x + 5, y + height - 5, + width - 5, 5, rgui_green_filler); + rgui_fill_rect(rgui_framebuf_data, + fb_pitch, x, y + 5, 5, + height - 5, rgui_green_filler); + } } color = NORMAL_COLOR(settings); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 1ea2c825a6..dd89b20305 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5306,6 +5306,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY, PARSE_ONLY_FLOAT, false) == 0) count++; + if (menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_ENABLE, + PARSE_ONLY_BOOL, false) == 0) + count++; if (menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_MENU_LINEAR_FILTER, PARSE_ONLY_BOOL, false) == 0) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index e307387d48..22c719367f 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5181,6 +5181,22 @@ static bool setting_append_list( if (BIT32_GET(flags.flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING)) setting_set = true; + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_rgui_border_filler_enable, + MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_ENABLE, + MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, + true, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_ADVANCED + ); + if (setting_set) CONFIG_BOOL( list, list_info, diff --git a/msg_hash.h b/msg_hash.h index c5151f1314..5abcdb94d7 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -748,6 +748,7 @@ enum msg_hash_enums MENU_LABEL(PAUSE_NONACTIVE), MENU_LABEL(MOUSE_ENABLE), MENU_LABEL(POINTER_ENABLE), + MENU_LABEL(MENU_RGUI_BORDER_FILLER_ENABLE), MENU_LABEL(MENU_LINEAR_FILTER), MENU_LABEL(MENU_HORIZONTAL_ANIMATION), MENU_LABEL(NAVIGATION_WRAPAROUND),