Load Content Special should now produce a filebrowser

This commit is contained in:
twinaphex 2017-07-30 15:58:46 +02:00
parent 50b838d8ed
commit fad37a3bd1
4 changed files with 27 additions and 3 deletions

View File

@ -262,6 +262,16 @@ int generic_action_ok_displaylist_push(const char *path,
info_label = label;
dl_type = DISPLAYLIST_GENERIC;
break;
case ACTION_OK_DL_FILE_BROWSER_SELECT_FILE:
if (path)
strlcpy(menu->deferred_path, path,
sizeof(menu->deferred_path));
info.type = type;
info.directory_ptr = idx;
info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
break;
case ACTION_OK_DL_FILE_BROWSER_SELECT_DIR:
if (path)
strlcpy(menu->deferred_path, path,
@ -3944,6 +3954,15 @@ int action_ok_push_filebrowser_list_dir_select(const char *path,
entry_idx, ACTION_OK_DL_FILE_BROWSER_SELECT_DIR);
}
int action_ok_push_filebrowser_list_file_select(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
filebrowser_set_type(FILEBROWSER_SELECT_FILE);
strlcpy(filebrowser_label, label, sizeof(filebrowser_label));
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
entry_idx, ACTION_OK_DL_FILE_BROWSER_SELECT_DIR);
}
static int action_ok_push_default(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@ -4667,7 +4686,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_ONLINE_UPDATER:
case MENU_ENUM_LABEL_NETPLAY:
case MENU_ENUM_LABEL_LOAD_CONTENT_LIST:
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
case MENU_ENUM_LABEL_ADD_CONTENT_LIST:
case MENU_ENUM_LABEL_CONFIGURATIONS_LIST:
case MENU_ENUM_LABEL_HELP_LIST:
@ -4675,6 +4693,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_CONTENT_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_default);
break;
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
BIND_ACTION_OK(cbs, action_ok_push_filebrowser_list_file_select);
break;
case MENU_ENUM_LABEL_SCAN_DIRECTORY:
BIND_ACTION_OK(cbs, action_ok_scan_directory_list);
break;

View File

@ -20,7 +20,7 @@
#include "menu_cbs.h"
#include "../verbosity.h"
#if 0
#if 1
#define DEBUG_LOG
#endif

View File

@ -45,6 +45,7 @@ enum
ACTION_OK_DL_SHADER_PRESET,
ACTION_OK_DL_GENERIC,
ACTION_OK_DL_PUSH_DEFAULT,
ACTION_OK_DL_FILE_BROWSER_SELECT_FILE,
ACTION_OK_DL_FILE_BROWSER_SELECT_DIR,
ACTION_OK_DL_INPUT_SETTINGS_LIST,
ACTION_OK_DL_DRIVER_SETTINGS_LIST,

View File

@ -2771,12 +2771,14 @@ static int menu_displaylist_parse_load_content_settings(
bool show_advanced_settings = settings->bools.menu_show_advanced_settings;
#endif
rarch_system_info_t *system = runloop_get_system_info();
#if 0
const struct retro_subsystem_info* subsystem = system ? system->subsystem.data : NULL;
if (subsystem)
{
int p;
unsigned p;
for (p = 0; p < system->subsystem.size; p++, subsystem++)
{
char s[PATH_MAX_LENGTH];