(Menu) Add MENU_FILE_PLAYLIST_ENTRY

This commit is contained in:
twinaphex 2014-09-02 23:42:40 +02:00
parent 1566822396
commit bc611b8cc1
4 changed files with 14 additions and 9 deletions

View File

@ -176,8 +176,7 @@ static int main_entry_iterate_menu(args_type() args)
g_extern.lifecycle_state |= (1ULL << MODE_CLEAR_INPUT);
/* If QUIT state came from command interface, we'll only see it
* once due to MODE_CLEAR_INPUT.
*/
* once due to MODE_CLEAR_INPUT. */
if (input_key_pressed_func(RARCH_QUIT_KEY) ||
!driver.video->alive(driver.video_data))
return 1;

View File

@ -1780,6 +1780,11 @@ static int menu_action_ok(const char *dir, unsigned menu_type)
file_list_get_at_offset(driver.menu->selection_buf,
driver.menu->selection_ptr, &path, &label, &type);
#if 0
RARCH_LOG("type : %d\n", type == MENU_FILE_USE_DIRECTORY);
RARCH_LOG("type id : %d\n", type);
#endif
if (menu_parse_check(label, type) == 0)
{
char cat_path[PATH_MAX];
@ -1788,6 +1793,12 @@ static int menu_action_ok(const char *dir, unsigned menu_type)
menu_entries_push(driver.menu->menu_stack,
cat_path, "browser_list", type, driver.menu->selection_ptr);
}
else if (type == MENU_FILE_PLAYLIST_ENTRY)
{
load_menu_content_history(driver.menu->selection_ptr);
menu_flush_stack_type(driver.menu->menu_stack,MENU_SETTINGS);
return -1;
}
else
{
#ifdef HAVE_SHADER_MANAGER
@ -1886,12 +1897,6 @@ static int menu_action_ok(const char *dir, unsigned menu_type)
menu_flush_stack_type(driver.menu->menu_stack,MENU_SETTINGS);
return -1;
}
else if (menu_type == MENU_SETTINGS_OPEN_HISTORY)
{
load_menu_content_history(driver.menu->selection_ptr);
menu_flush_stack_type(driver.menu->menu_stack,MENU_SETTINGS);
return -1;
}
else if (menu_type == MENU_CONTENT_HISTORY_PATH)
{
if ((setting = (rarch_setting_t*)setting_data_find_setting(

View File

@ -59,6 +59,7 @@ typedef enum
MENU_FILE_PLAIN,
MENU_FILE_DIRECTORY,
MENU_FILE_DEVICE,
MENU_FILE_PLAYLIST_ENTRY,
MENU_FILE_USE_DIRECTORY,
MENU_SETTINGS,
} menu_file_type_t;

View File

@ -173,7 +173,7 @@ int menu_entries_push_list(menu_handle_t *menu,
}
file_list_push(list, fill_buf, "",
MENU_FILE_PLAIN, 0);
MENU_FILE_PLAYLIST_ENTRY, 0);
do_action = true;
}