mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Add "Select Downloaded File And Detect Core"
This commit is contained in:
parent
d7d7eb4c74
commit
3ec0edd686
5 changed files with 38 additions and 1 deletions
|
@ -694,6 +694,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label(menu_file_list_cbs_t *
|
|||
case MENU_LABEL_CONTENT_HISTORY_PATH:
|
||||
cbs->action_deferred_push = deferred_push_content_history_path;
|
||||
break;
|
||||
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
cbs->action_deferred_push = deferred_push_detect_core_list;
|
||||
break;
|
||||
|
|
|
@ -383,6 +383,25 @@ static int action_ok_shader_preset(const char *path,
|
|||
return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC);
|
||||
}
|
||||
|
||||
static int action_ok_push_downloads_dir(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
menu_displaylist_info_t info = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
|
||||
info.list = menu_list->menu_stack;
|
||||
info.type = MENU_FILE_DIRECTORY;
|
||||
info.directory_ptr = idx;
|
||||
strlcpy(info.path, settings->core_assets_directory, sizeof(info.path));
|
||||
strlcpy(info.label, label, sizeof(info.label));
|
||||
|
||||
return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC);
|
||||
}
|
||||
|
||||
static int action_ok_push_content_list(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
|
@ -1826,6 +1845,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
|||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
cbs->action_ok = action_ok_push_content_list;
|
||||
break;
|
||||
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
cbs->action_ok = action_ok_push_downloads_dir;
|
||||
break;
|
||||
case MENU_LABEL_DETECT_CORE_LIST_OK:
|
||||
cbs->action_ok = action_ok_file_load_detect_core;
|
||||
break;
|
||||
|
@ -2061,6 +2083,7 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
|||
case MENU_LABEL_SCAN_FILE:
|
||||
cbs->action_ok = action_ok_scan_file;
|
||||
break;
|
||||
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
#ifdef HAVE_COMPRESSION
|
||||
if (type == MENU_FILE_IN_CARCHIVE)
|
||||
|
|
|
@ -26,6 +26,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
|||
{
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
return "downloaded_file_detect_core_list";
|
||||
case MENU_LABEL_UPDATE_CORE_INFO_FILES:
|
||||
return "update_core_info_files";
|
||||
case MENU_LABEL_DEFERRED_CORE_CONTENT_LIST:
|
||||
|
@ -988,6 +990,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
|||
return "Select From Collection";
|
||||
case MENU_LABEL_VALUE_DETECT_CORE_LIST:
|
||||
return "Select File And Detect Core";
|
||||
case MENU_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
return "Select Downloaded File And Detect Core";
|
||||
case MENU_LABEL_VALUE_LOAD_CONTENT_HISTORY:
|
||||
return "Load Recent";
|
||||
case MENU_LABEL_VALUE_AUDIO_ENABLE:
|
||||
|
|
|
@ -1695,6 +1695,11 @@ static int menu_displaylist_parse_load_content_list(menu_displaylist_info_t *inf
|
|||
menu_hash_to_str(MENU_LABEL_VALUE_DETECT_CORE_LIST),
|
||||
menu_hash_to_str(MENU_LABEL_DETECT_CORE_LIST),
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
|
||||
menu_list_push(info->list,
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
|
||||
menu_hash_to_str(MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
|
@ -1980,7 +1985,8 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
|||
break;
|
||||
case RARCH_PLAIN_FILE:
|
||||
default:
|
||||
if (hash_label == MENU_LABEL_DETECT_CORE_LIST)
|
||||
if (hash_label == MENU_LABEL_DETECT_CORE_LIST ||
|
||||
hash_label == MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST)
|
||||
{
|
||||
if (path_is_compressed_file(str_list->elems[i].data))
|
||||
{
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MENU_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST 0x39310fc8U
|
||||
#define MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST 0xb4f82700U
|
||||
|
||||
#define MENU_LABEL_VALUE_UPDATE_CORE_INFO_FILES 0xba274810U
|
||||
#define MENU_LABEL_UPDATE_CORE_INFO_FILES 0x620d758dU
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue