@@ -119,7 +119,42 @@ static dialog_return_t color_shift_cb(dialog_option_t *option, dialog_event_t ev
119
119
return RG_DIALOG_IGNORE ;
120
120
}
121
121
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 )
123
158
{
124
159
tab_t * tab = gui_get_current_tab ();
125
160
int last_key = -1 ;
@@ -183,30 +218,15 @@ void retro_loop()
183
218
}
184
219
185
220
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
194
226
gui_redraw ();
195
227
}
196
228
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 ();
210
230
gui_redraw ();
211
231
}
212
232
else if (last_key == RG_KEY_SELECT ) {
0 commit comments