From 6082801529d14f271f32f2f68693ce50a4400b68 Mon Sep 17 00:00:00 2001 From: Alex Duchesne Date: Tue, 23 Nov 2021 18:42:01 -0500 Subject: [PATCH] Fixed: Not being able to access the launcher's options menu on the MRGC --- launcher/main/bookmarks.c | 7 +++-- launcher/main/emulators.c | 10 +++--- launcher/main/main.c | 64 +++++++++++++++++++++++++-------------- 3 files changed, 52 insertions(+), 29 deletions(-) diff --git a/launcher/main/bookmarks.c b/launcher/main/bookmarks.c index 79ce40be9..2e398607b 100644 --- a/launcher/main/bookmarks.c +++ b/launcher/main/bookmarks.c @@ -99,11 +99,12 @@ static void tab_refresh(book_type_t book_type) } else { - gui_resize_list(book->tab, 6); + gui_resize_list(book->tab, 8); sprintf(book->tab->listbox.items[0].text, "Welcome to Retro-Go!"); sprintf(book->tab->listbox.items[2].text, "You have no %s games.", book->name); - sprintf(book->tab->listbox.items[4].text, "Use SELECT and START to navigate."); - book->tab->listbox.cursor = 3; + sprintf(book->tab->listbox.items[5].text, "You can hide this tab in the menu"); + sprintf(book->tab->listbox.items[7].text, "Use SELECT and START to navigate."); + book->tab->listbox.cursor = 4; } } diff --git a/launcher/main/emulators.c b/launcher/main/emulators.c index 5dc599322..fe7bad90b 100644 --- a/launcher/main/emulators.c +++ b/launcher/main/emulators.c @@ -355,10 +355,12 @@ static void tab_refresh(tab_t *tab) } gui_resize_list(tab, 8); - sprintf(tab->listbox.items[0].text, "Place roms in folder: /roms/%s", emu->short_name); - sprintf(tab->listbox.items[2].text, "With file extension: %s", extensions); - sprintf(tab->listbox.items[4].text, "Use SELECT and START to navigate."); - tab->listbox.cursor = 3; + sprintf(tab->listbox.items[0].text, "Welcome to Retro-Go!"); + sprintf(tab->listbox.items[2].text, "Place roms in folder: /roms/%s", emu->short_name); + sprintf(tab->listbox.items[3].text, "With file extension: %s", extensions); + sprintf(tab->listbox.items[5].text, "You can hide this tab in the menu"); + sprintf(tab->listbox.items[7].text, "Use SELECT and START to navigate"); + tab->listbox.cursor = 4; } } diff --git a/launcher/main/main.c b/launcher/main/main.c index 6f82a97ff..c477d17c0 100644 --- a/launcher/main/main.c +++ b/launcher/main/main.c @@ -119,7 +119,42 @@ static dialog_return_t color_shift_cb(dialog_option_t *option, dialog_event_t ev return RG_DIALOG_IGNORE; } -void retro_loop() +static void show_about_dialog(void) +{ + const dialog_option_t options[] = { + {1, "Clear cache", NULL, 1, NULL}, + RG_DIALOG_CHOICE_LAST + }; + if (rg_gui_about_menu(options) == 1) { + unlink(CRC_CACHE_PATH); + rg_system_restart(); + } +} + +static void show_options_dialog(void) +{ + const dialog_option_t options[] = { + RG_DIALOG_SEPARATOR, + {0, "Color theme", "...", 1, &color_shift_cb}, + {0, "Font type ", "...", 1, &font_type_cb}, + {0, "Preview ", "...", 1, &show_preview_cb}, + {0, " - Delay", "...", 1, &show_preview_speed_cb}, + {0, "Toggle tabs", "...", 1, &toggle_tabs_cb}, + {0, "Startup app", "...", 1, &startup_app_cb}, + {0, "Disk LED ", "...", 1, &disk_activity_cb}, + #if !RG_GAMEPAD_OPTION_BTN + RG_DIALOG_SEPARATOR, + {100, "About... ", NULL, 1, NULL}, + #endif + RG_DIALOG_CHOICE_LAST + }; + int sel = rg_gui_settings_menu(options); + gui_save_config(true); + if (sel == 100) + show_about_dialog(); +} + +static void retro_loop(void) { tab_t *tab = gui_get_current_tab(); int last_key = -1; @@ -183,30 +218,15 @@ void retro_loop() } if (last_key == RG_KEY_MENU) { - const dialog_option_t options[] = { - {1, "Clear cache", NULL, 1, NULL}, - RG_DIALOG_CHOICE_LAST - }; - if (rg_gui_about_menu(options) == 1) { - unlink(CRC_CACHE_PATH); - rg_system_restart(); - } + #if !RG_GAMEPAD_OPTION_BTN + show_options_dialog(); + #else + show_about_dialog(); + #endif gui_redraw(); } else if (last_key == RG_KEY_OPTION) { - const dialog_option_t options[] = { - RG_DIALOG_SEPARATOR, - {0, "Color theme", "...", 1, &color_shift_cb}, - {0, "Font type ", "...", 1, &font_type_cb}, - {0, "Preview ", "...", 1, &show_preview_cb}, - {0, " - Delay", "...", 1, &show_preview_speed_cb}, - {0, "Toggle tabs", "...", 1, &toggle_tabs_cb}, - {0, "Startup app", "...", 1, &startup_app_cb}, - {0, "Disk LED ", "...", 1, &disk_activity_cb}, - RG_DIALOG_CHOICE_LAST - }; - rg_gui_settings_menu(options); - gui_save_config(true); + show_options_dialog(); gui_redraw(); } else if (last_key == RG_KEY_SELECT) {