Skip to content

Commit 6082801

Browse files
committed
Fixed: Not being able to access the launcher's options menu on the MRGC
1 parent 47eede7 commit 6082801

File tree

3 files changed

+52
-29
lines changed

3 files changed

+52
-29
lines changed

launcher/main/bookmarks.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ static void tab_refresh(book_type_t book_type)
9999
}
100100
else
101101
{
102-
gui_resize_list(book->tab, 6);
102+
gui_resize_list(book->tab, 8);
103103
sprintf(book->tab->listbox.items[0].text, "Welcome to Retro-Go!");
104104
sprintf(book->tab->listbox.items[2].text, "You have no %s games.", book->name);
105-
sprintf(book->tab->listbox.items[4].text, "Use SELECT and START to navigate.");
106-
book->tab->listbox.cursor = 3;
105+
sprintf(book->tab->listbox.items[5].text, "You can hide this tab in the menu");
106+
sprintf(book->tab->listbox.items[7].text, "Use SELECT and START to navigate.");
107+
book->tab->listbox.cursor = 4;
107108
}
108109
}
109110

launcher/main/emulators.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,12 @@ static void tab_refresh(tab_t *tab)
355355
}
356356

357357
gui_resize_list(tab, 8);
358-
sprintf(tab->listbox.items[0].text, "Place roms in folder: /roms/%s", emu->short_name);
359-
sprintf(tab->listbox.items[2].text, "With file extension: %s", extensions);
360-
sprintf(tab->listbox.items[4].text, "Use SELECT and START to navigate.");
361-
tab->listbox.cursor = 3;
358+
sprintf(tab->listbox.items[0].text, "Welcome to Retro-Go!");
359+
sprintf(tab->listbox.items[2].text, "Place roms in folder: /roms/%s", emu->short_name);
360+
sprintf(tab->listbox.items[3].text, "With file extension: %s", extensions);
361+
sprintf(tab->listbox.items[5].text, "You can hide this tab in the menu");
362+
sprintf(tab->listbox.items[7].text, "Use SELECT and START to navigate");
363+
tab->listbox.cursor = 4;
362364
}
363365
}
364366

launcher/main/main.c

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,42 @@ static dialog_return_t color_shift_cb(dialog_option_t *option, dialog_event_t ev
119119
return RG_DIALOG_IGNORE;
120120
}
121121

122-
void retro_loop()
122+
static void show_about_dialog(void)
123+
{
124+
const dialog_option_t options[] = {
125+
{1, "Clear cache", NULL, 1, NULL},
126+
RG_DIALOG_CHOICE_LAST
127+
};
128+
if (rg_gui_about_menu(options) == 1) {
129+
unlink(CRC_CACHE_PATH);
130+
rg_system_restart();
131+
}
132+
}
133+
134+
static void show_options_dialog(void)
135+
{
136+
const dialog_option_t options[] = {
137+
RG_DIALOG_SEPARATOR,
138+
{0, "Color theme", "...", 1, &color_shift_cb},
139+
{0, "Font type ", "...", 1, &font_type_cb},
140+
{0, "Preview ", "...", 1, &show_preview_cb},
141+
{0, " - Delay", "...", 1, &show_preview_speed_cb},
142+
{0, "Toggle tabs", "...", 1, &toggle_tabs_cb},
143+
{0, "Startup app", "...", 1, &startup_app_cb},
144+
{0, "Disk LED ", "...", 1, &disk_activity_cb},
145+
#if !RG_GAMEPAD_OPTION_BTN
146+
RG_DIALOG_SEPARATOR,
147+
{100, "About... ", NULL, 1, NULL},
148+
#endif
149+
RG_DIALOG_CHOICE_LAST
150+
};
151+
int sel = rg_gui_settings_menu(options);
152+
gui_save_config(true);
153+
if (sel == 100)
154+
show_about_dialog();
155+
}
156+
157+
static void retro_loop(void)
123158
{
124159
tab_t *tab = gui_get_current_tab();
125160
int last_key = -1;
@@ -183,30 +218,15 @@ void retro_loop()
183218
}
184219

185220
if (last_key == RG_KEY_MENU) {
186-
const dialog_option_t options[] = {
187-
{1, "Clear cache", NULL, 1, NULL},
188-
RG_DIALOG_CHOICE_LAST
189-
};
190-
if (rg_gui_about_menu(options) == 1) {
191-
unlink(CRC_CACHE_PATH);
192-
rg_system_restart();
193-
}
221+
#if !RG_GAMEPAD_OPTION_BTN
222+
show_options_dialog();
223+
#else
224+
show_about_dialog();
225+
#endif
194226
gui_redraw();
195227
}
196228
else if (last_key == RG_KEY_OPTION) {
197-
const dialog_option_t options[] = {
198-
RG_DIALOG_SEPARATOR,
199-
{0, "Color theme", "...", 1, &color_shift_cb},
200-
{0, "Font type ", "...", 1, &font_type_cb},
201-
{0, "Preview ", "...", 1, &show_preview_cb},
202-
{0, " - Delay", "...", 1, &show_preview_speed_cb},
203-
{0, "Toggle tabs", "...", 1, &toggle_tabs_cb},
204-
{0, "Startup app", "...", 1, &startup_app_cb},
205-
{0, "Disk LED ", "...", 1, &disk_activity_cb},
206-
RG_DIALOG_CHOICE_LAST
207-
};
208-
rg_gui_settings_menu(options);
209-
gui_save_config(true);
229+
show_options_dialog();
210230
gui_redraw();
211231
}
212232
else if (last_key == RG_KEY_SELECT) {

0 commit comments

Comments
 (0)