Start moving menu_action_ok over as well
This commit is contained in:
parent
c4d9642bf4
commit
ea29099e0a
|
@ -190,7 +190,7 @@ static int menu_setting_ok_toggle(unsigned type,
|
|||
driver.menu->selection_ptr);
|
||||
|
||||
if (cbs && cbs->action_ok)
|
||||
return cbs->action_ok(dir, label, type, action);
|
||||
return cbs->action_ok(dir, label, type, driver.menu->selection_ptr);
|
||||
|
||||
if (type == MENU_SETTINGS_CUSTOM_BIND_ALL)
|
||||
{
|
||||
|
@ -737,6 +737,7 @@ static int menu_action_ok(const char *menu_path,
|
|||
{
|
||||
const char *label = NULL;
|
||||
const char *path = NULL;
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
unsigned type = 0;
|
||||
rarch_setting_t *setting_data = (rarch_setting_t *)driver.menu->list_settings;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)
|
||||
|
@ -750,6 +751,13 @@ static int menu_action_ok(const char *menu_path,
|
|||
file_list_get_at_offset(driver.menu->selection_buf,
|
||||
driver.menu->selection_ptr, &path, &label, &type);
|
||||
|
||||
cbs = (menu_file_list_cbs_t*)
|
||||
file_list_get_actiondata_at_offset(driver.menu->selection_buf,
|
||||
driver.menu->selection_ptr);
|
||||
|
||||
if (cbs && cbs->action_ok)
|
||||
return cbs->action_ok(path, label, type, driver.menu->selection_ptr);
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("menu label: %s\n", menu_label);
|
||||
RARCH_LOG("type : %d\n", type == MENU_FILE_USE_DIRECTORY);
|
||||
|
@ -759,13 +767,6 @@ static int menu_action_ok(const char *menu_path,
|
|||
{
|
||||
switch (type)
|
||||
{
|
||||
case MENU_FILE_PLAYLIST_ENTRY:
|
||||
|
||||
rarch_playlist_load_content(g_defaults.history,
|
||||
driver.menu->selection_ptr);
|
||||
menu_flush_stack_type(driver.menu->menu_stack, MENU_SETTINGS);
|
||||
return -1;
|
||||
|
||||
#ifdef HAVE_COMPRESSION
|
||||
case MENU_FILE_IN_CARCHIVE:
|
||||
#endif
|
||||
|
|
|
@ -31,6 +31,18 @@ static int action_ok_push_content_list(const char *path,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int action_ok_playlist_entry(const char *path,
|
||||
const char *label, unsigned type, size_t index)
|
||||
{
|
||||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
rarch_playlist_load_content(g_defaults.history,
|
||||
driver.menu->selection_ptr);
|
||||
menu_flush_stack_type(driver.menu->menu_stack, MENU_SETTINGS);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int action_ok_push_history_list(const char *path,
|
||||
const char *label, unsigned type, size_t index)
|
||||
{
|
||||
|
@ -84,7 +96,9 @@ static void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
|||
|
||||
cbs->action_ok = NULL;
|
||||
|
||||
if (
|
||||
if (type == MENU_FILE_PLAYLIST_ENTRY)
|
||||
cbs->action_ok = action_ok_playlist_entry;
|
||||
else if (
|
||||
!strcmp(label, "load_content") ||
|
||||
!strcmp(label, "detect_core_list")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue