Get rid of menu_entry_go_back
This commit is contained in:
parent
ee9cb593c5
commit
02ad99048d
|
@ -17,6 +17,7 @@
|
|||
#include <string/stdstring.h>
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_navigation.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../../msg_hash.h"
|
||||
|
||||
|
@ -26,10 +27,17 @@
|
|||
cbs->action_cancel_ident = #name;
|
||||
#endif
|
||||
|
||||
/* Clicks the back button */
|
||||
static int action_cancel_pop_default(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return menu_entry_go_back();
|
||||
size_t new_selection_ptr;
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr);
|
||||
menu_entries_pop_stack(&new_selection_ptr, 0, 1);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_cancel_core_content(const char *path,
|
||||
|
|
|
@ -33,18 +33,6 @@
|
|||
* notify_list_loaded on the UI companion.
|
||||
*/
|
||||
|
||||
/* Clicks the back button */
|
||||
int menu_entry_go_back(void)
|
||||
{
|
||||
size_t new_selection_ptr;
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr);
|
||||
menu_entries_pop_stack(&new_selection_ptr, 0, 1);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
enum menu_entry_type menu_entry_get_type(uint32_t i)
|
||||
{
|
||||
rarch_setting_t *setting = menu_entries_get_setting(i);
|
||||
|
|
|
@ -53,8 +53,6 @@ typedef struct menu_entry
|
|||
unsigned spacing;
|
||||
} menu_entry_t;
|
||||
|
||||
int menu_entry_go_back(void);
|
||||
|
||||
enum menu_entry_type menu_entry_get_type(uint32_t i);
|
||||
|
||||
void menu_entry_get_path(uint32_t i, char *s, size_t len);
|
||||
|
|
|
@ -1128,8 +1128,10 @@ static int menu_input_pointer_post_iterate(
|
|||
{
|
||||
if (!pointer_oldback)
|
||||
{
|
||||
size_t selection;
|
||||
pointer_oldback = true;
|
||||
menu_entry_go_back();
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
menu_entry_action(entry, selection, MENU_ACTION_CANCEL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -761,7 +761,9 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
|||
|
||||
- (void)menuBack
|
||||
{
|
||||
menu_entry_go_back();
|
||||
size_t selection;
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
menu_entry_action(entry, selection, MENU_ACTION_CANCEL);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue