Change menu_entry_select's signature

This commit is contained in:
Twinaphex 2015-05-15 04:38:58 +02:00
parent 6cedc39ded
commit 83f3847b30
2 changed files with 6 additions and 5 deletions

View File

@ -383,7 +383,7 @@ int menu_entry_get_current_id(bool use_representation)
// is the most important function because it does all the work // is the most important function because it does all the work
// associated with clicking on things in the UI. This includes loading // associated with clicking on things in the UI. This includes loading
// cores and updating the currently displayed menu // cores and updating the currently displayed menu
void menu_entry_select(uint32_t i) int menu_entry_select(uint32_t i)
{ {
menu_entry_t entry; menu_entry_t entry;
menu_file_list_cbs_t *cbs = NULL; menu_file_list_cbs_t *cbs = NULL;
@ -398,14 +398,15 @@ void menu_entry_select(uint32_t i)
menu_list_get_actiondata_at_offset(menu_list->selection_buf, i); menu_list_get_actiondata_at_offset(menu_list->selection_buf, i);
if (setting_is_of_path_type(setting)) if (setting_is_of_path_type(setting))
return; return 0;
if (setting_is_of_general_type(setting)) if (setting_is_of_general_type(setting))
{ {
nav->selection_ptr = i; nav->selection_ptr = i;
if (cbs && cbs->action_ok) if (cbs && cbs->action_ok)
cbs->action_ok(entry.path, entry.label, entry.type, i); cbs->action_ok(entry.path, entry.label, entry.type, i);
return; return 0;
} }
nav->selection_ptr = i; nav->selection_ptr = i;
@ -420,7 +421,7 @@ void menu_entry_select(uint32_t i)
menu_list_push(menu_list->menu_stack, "", menu_list_push(menu_list->menu_stack, "",
"info_screen", 0, i); "info_screen", 0, i);
} }
return; return 0;
} }
int menu_entry_iterate(unsigned action) int menu_entry_iterate(unsigned action)

View File

@ -114,7 +114,7 @@ void menu_entry_get(menu_entry_t *entry, size_t i,
int menu_entry_iterate(unsigned action); int menu_entry_iterate(unsigned action);
void menu_entry_select(uint32_t i); int menu_entry_select(uint32_t i);
int menu_entry_action(menu_entry_t *entry, unsigned i, unsigned action); int menu_entry_action(menu_entry_t *entry, unsigned i, unsigned action);