static int deferred_push_detect_core_list(menu_displaylist_info_t *info) { global_t *global = global_get_ptr(); info->type_default = MENU_FILE_PLAIN; if (global->core_info) strlcpy(info->exts, core_info_list_get_all_extensions( global->core_info), sizeof(info->exts)); return menu_displaylist_push_list(info, DISPLAYLIST_CORES_DETECTED); }
static int deferred_push_detect_core_list(menu_displaylist_info_t *info) { settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); info->type_default = MENU_FILE_PLAIN; if (global->core_info) strlcpy(info->exts, core_info_list_get_all_extensions( global->core_info), sizeof(info->exts)); (void)settings; if (settings->multimedia.builtin_mediaplayer_enable || settings->multimedia.builtin_imageviewer_enable) { struct retro_system_info sysinfo = {0}; (void)sysinfo; #ifdef HAVE_FFMPEG if (settings->multimedia.builtin_mediaplayer_enable) { libretro_ffmpeg_retro_get_system_info(&sysinfo); strlcat(info->exts, "|", sizeof(info->exts)); strlcat(info->exts, sysinfo.valid_extensions, sizeof(info->exts)); } #endif #ifdef HAVE_IMAGEVIEWER if (settings->multimedia.builtin_imageviewer_enable) { libretro_imageviewer_retro_get_system_info(&sysinfo); strlcat(info->exts, "|", sizeof(info->exts)); strlcat(info->exts, sysinfo.valid_extensions, sizeof(info->exts)); } #endif } return menu_displaylist_push_list(info, DISPLAYLIST_CORES_DETECTED); }
static int general_push(menu_displaylist_info_t *info, unsigned id, unsigned type) { settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); rarch_system_info_t *system = rarch_system_info_get_ptr(); menu_handle_t *menu = menu_driver_get_ptr(); const char *exts = core_info_list_get_all_extensions(); switch (id) { case PUSH_DEFAULT: case PUSH_DETECT_CORE_LIST: break; default: fill_pathname_join(info->path, menu->scratch2_buf, menu->scratch_buf, sizeof(info->path)); fill_pathname_join(info->label, menu->scratch2_buf, menu->scratch_buf, sizeof(info->label)); break; } info->type_default = MENU_FILE_PLAIN; switch (id) { case PUSH_ARCHIVE_OPEN_DETECT_CORE: info->setting = menu_setting_find(info->label); if (exts) strlcpy(info->exts, exts, sizeof(info->exts)); else if (global->menu.info.valid_extensions) { if (*global->menu.info.valid_extensions) strlcpy(info->exts, global->menu.info.valid_extensions, sizeof(info->exts)); } else strlcpy(info->exts, system->valid_extensions, sizeof(info->exts)); break; case PUSH_ARCHIVE_OPEN: info->setting = menu_setting_find(info->label); if (global->menu.info.valid_extensions) { if (*global->menu.info.valid_extensions) strlcpy(info->exts, global->menu.info.valid_extensions, sizeof(info->exts)); } else strlcpy(info->exts, system->valid_extensions, sizeof(info->exts)); break; case PUSH_DEFAULT: info->setting = menu_setting_find(info->label); if (menu_setting_get_browser_selection_type(info->setting) == ST_DIR) { } else if (global->menu.info.valid_extensions) { if (*global->menu.info.valid_extensions) strlcpy(info->exts, global->menu.info.valid_extensions, sizeof(info->exts)); } else strlcpy(info->exts, system->valid_extensions, sizeof(info->exts)); break; case PUSH_DETECT_CORE_LIST: if (exts) strlcpy(info->exts, exts, sizeof(info->exts)); break; } (void)settings; if (settings->multimedia.builtin_mediaplayer_enable || settings->multimedia.builtin_imageviewer_enable) { struct retro_system_info sysinfo = {0}; (void)sysinfo; #ifdef HAVE_FFMPEG if (settings->multimedia.builtin_mediaplayer_enable) { libretro_ffmpeg_retro_get_system_info(&sysinfo); strlcat(info->exts, "|", sizeof(info->exts)); strlcat(info->exts, sysinfo.valid_extensions, sizeof(info->exts)); } #endif #ifdef HAVE_IMAGEVIEWER if (settings->multimedia.builtin_imageviewer_enable) { libretro_imageviewer_retro_get_system_info(&sysinfo); strlcat(info->exts, "|", sizeof(info->exts)); strlcat(info->exts, sysinfo.valid_extensions, sizeof(info->exts)); } #endif } return deferred_push_dlist(info, type); }