Skip to content

Commit

Permalink
Fixed: Not being able to access the launcher's options menu on the MRGC
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Nov 23, 2021
1 parent 47eede7 commit 6082801
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 29 deletions.
7 changes: 4 additions & 3 deletions launcher/main/bookmarks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
10 changes: 6 additions & 4 deletions launcher/main/emulators.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
64 changes: 42 additions & 22 deletions launcher/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 6082801

Please sign in to comment.