2015-02-26 16:33:00 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <file/file_path.h>
|
2015-12-26 06:37:44 +00:00
|
|
|
#include <string/stdstring.h>
|
2015-06-05 07:31:07 +00:00
|
|
|
|
2015-12-06 16:55:27 +00:00
|
|
|
#include "../menu_driver.h"
|
2015-06-26 13:28:01 +00:00
|
|
|
#include "../menu_cbs.h"
|
2015-11-23 14:13:26 +00:00
|
|
|
#include "../../msg_hash.h"
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-06-13 17:15:48 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
|
|
|
#include "../../database_info.h"
|
|
|
|
#endif
|
|
|
|
|
2015-06-23 04:13:57 +00:00
|
|
|
#include "../../cores/internal_cores.h"
|
|
|
|
|
2015-12-11 12:56:00 +00:00
|
|
|
#include "../../core_info.h"
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "../../general.h"
|
2015-12-06 18:31:47 +00:00
|
|
|
#include "../../system.h"
|
2015-11-23 14:28:20 +00:00
|
|
|
#include "../../verbosity.h"
|
2015-11-23 14:13:26 +00:00
|
|
|
#include "../../tasks/tasks.h"
|
|
|
|
|
|
|
|
#define CB_CORE_UPDATER_DOWNLOAD 0x7412da7dU
|
|
|
|
#define CB_CORE_UPDATER_LIST 0x32fd4f01U
|
|
|
|
#define CB_UPDATE_ASSETS 0xbf85795eU
|
|
|
|
#define CB_UPDATE_CORE_INFO_FILES 0xe6084091U
|
|
|
|
#define CB_UPDATE_AUTOCONFIG_PROFILES 0x28ada67dU
|
|
|
|
#define CB_UPDATE_CHEATS 0xc360fec3U
|
|
|
|
#define CB_UPDATE_OVERLAYS 0x699009a0U
|
|
|
|
#define CB_UPDATE_DATABASES 0x931eb8d3U
|
|
|
|
#define CB_UPDATE_SHADERS_GLSL 0x0121a186U
|
|
|
|
#define CB_UPDATE_SHADERS_CG 0xc93a53feU
|
|
|
|
#define CB_CORE_CONTENT_LIST 0xebc51227U
|
|
|
|
#define CB_CORE_CONTENT_DOWNLOAD 0x03b3c0a3U
|
2015-12-24 19:13:50 +00:00
|
|
|
#define CB_LAKKA_DOWNLOAD 0x54eaa904U
|
2015-03-07 22:31:16 +00:00
|
|
|
|
2015-10-11 19:08:07 +00:00
|
|
|
#ifndef BIND_ACTION_DEFERRED_PUSH
|
|
|
|
#define BIND_ACTION_DEFERRED_PUSH(cbs, name) \
|
|
|
|
cbs->action_deferred_push = name; \
|
|
|
|
cbs->action_deferred_push_ident = #name;
|
|
|
|
#endif
|
|
|
|
|
2015-10-21 23:38:41 +00:00
|
|
|
static int deferred_push_dlist(menu_displaylist_info_t *info, unsigned val)
|
|
|
|
{
|
|
|
|
if (menu_displaylist_push_list(info, val) != 0)
|
|
|
|
return -1;
|
|
|
|
menu_displaylist_push_list_process(info);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_information(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CORE_INFO);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_system_information(menu_displaylist_info_t *info)
|
2015-04-16 17:36:34 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_SYSTEM_INFO);
|
2015-04-16 17:36:34 +00:00
|
|
|
}
|
|
|
|
|
2015-09-24 01:48:08 +00:00
|
|
|
static int deferred_push_debug_information(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_DEBUG_INFO);
|
2015-09-24 01:48:08 +00:00
|
|
|
}
|
|
|
|
|
2015-11-08 02:58:50 +00:00
|
|
|
static int deferred_push_achievement_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_ACHIEVEMENT_LIST);
|
|
|
|
}
|
|
|
|
|
2015-05-21 22:28:02 +00:00
|
|
|
static int deferred_push_rdb_collection(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_PLAYLIST_COLLECTION);
|
2015-05-21 22:28:02 +00:00
|
|
|
}
|
|
|
|
|
2015-10-23 04:54:33 +00:00
|
|
|
static int deferred_user_binds_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_USER_BINDS_LIST);
|
|
|
|
}
|
|
|
|
|
2015-10-17 13:28:16 +00:00
|
|
|
static int deferred_push_accounts_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_ACCOUNTS_LIST);
|
2015-10-17 13:28:16 +00:00
|
|
|
}
|
|
|
|
|
2015-10-24 08:31:11 +00:00
|
|
|
static int deferred_push_input_settings_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_INPUT_SETTINGS_LIST);
|
|
|
|
}
|
|
|
|
|
2015-10-25 09:25:07 +00:00
|
|
|
static int deferred_push_playlist_settings_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_PLAYLIST_SETTINGS_LIST);
|
|
|
|
}
|
|
|
|
|
2015-10-25 09:41:53 +00:00
|
|
|
static int deferred_push_input_hotkey_binds_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST);
|
|
|
|
}
|
|
|
|
|
2015-10-17 13:58:59 +00:00
|
|
|
static int deferred_push_accounts_cheevos_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST);
|
2015-10-17 13:58:59 +00:00
|
|
|
}
|
|
|
|
|
2015-07-17 18:33:09 +00:00
|
|
|
static int deferred_push_help(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_HELP_SCREEN_LIST);
|
2015-07-17 18:33:09 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_rdb_entry_detail(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_DATABASE_ENTRY);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-07-23 17:44:59 +00:00
|
|
|
static int deferred_push_rpl_entry_actions(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS);
|
2015-07-23 17:44:59 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_list_deferred(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CORES_SUPPORTED);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-06-07 21:26:29 +00:00
|
|
|
static int deferred_push_core_collection_list_deferred(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CORES_COLLECTION_SUPPORTED);
|
2015-06-07 21:26:29 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_database_manager_list_deferred(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-05-13 14:18:43 +00:00
|
|
|
strlcpy(info->path_b, info->path, sizeof(info->path_b));
|
|
|
|
info->path_c[0] = '\0';
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_DATABASE_QUERY);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_cursor_manager_list_deferred(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-09-01 22:13:55 +00:00
|
|
|
char rdb_path[PATH_MAX_LENGTH];
|
2015-09-04 15:08:39 +00:00
|
|
|
int ret = -1;
|
2015-06-12 15:23:31 +00:00
|
|
|
char *query = NULL;
|
|
|
|
char *rdb = NULL;
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
config_file_t *conf = config_file_new(info->path);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-05-13 11:07:57 +00:00
|
|
|
if (!conf || !settings)
|
2015-09-04 15:08:39 +00:00
|
|
|
goto end;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
|
|
|
if (!config_get_string(conf, "query", &query))
|
2015-09-04 15:08:39 +00:00
|
|
|
goto end;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
|
|
|
if (!config_get_string(conf, "rdb", &rdb))
|
2015-09-04 15:08:39 +00:00
|
|
|
goto end;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
fill_pathname_join(rdb_path, settings->content_database,
|
2015-02-26 16:33:00 +00:00
|
|
|
rdb, sizeof(rdb_path));
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
strlcpy(info->path_b, info->path, sizeof(info->path_b));
|
|
|
|
strlcpy(info->path, rdb_path, sizeof(info->path));
|
|
|
|
strlcpy(info->path_c, query, sizeof(info->path_c));
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-10-21 23:38:41 +00:00
|
|
|
ret = deferred_push_dlist(info, DISPLAYLIST_DATABASE_QUERY);
|
2015-09-01 22:13:55 +00:00
|
|
|
|
2015-09-04 15:08:39 +00:00
|
|
|
end:
|
2015-09-01 22:13:55 +00:00
|
|
|
if (conf)
|
|
|
|
config_file_free(conf);
|
2015-09-04 15:08:39 +00:00
|
|
|
return ret;
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_cursor_manager_list_deferred_query_subsearch(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-09-04 15:08:39 +00:00
|
|
|
int ret = -1;
|
2015-05-25 05:46:56 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-06-12 15:23:31 +00:00
|
|
|
char query[PATH_MAX_LENGTH] = {0};
|
2015-05-13 14:18:43 +00:00
|
|
|
struct string_list *str_list = string_split(info->path, "|");
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-05-24 17:36:28 +00:00
|
|
|
database_info_build_query(query, sizeof(query), info->label, str_list->elems[0].data);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-12-26 06:37:44 +00:00
|
|
|
if (string_is_empty(query))
|
2015-09-04 15:08:39 +00:00
|
|
|
goto end;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
strlcpy(info->path, str_list->elems[1].data, sizeof(info->path));
|
|
|
|
strlcpy(info->path_b, str_list->elems[0].data, sizeof(info->path_b));
|
|
|
|
strlcpy(info->path_c, query, sizeof(info->path_c));
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-10-21 23:38:41 +00:00
|
|
|
ret = deferred_push_dlist(info, DISPLAYLIST_DATABASE_QUERY);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-09-04 15:08:39 +00:00
|
|
|
end:
|
|
|
|
if (str_list)
|
|
|
|
string_list_free(str_list);
|
2015-05-25 05:46:56 +00:00
|
|
|
#endif
|
2015-09-04 15:08:39 +00:00
|
|
|
return ret;
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_video_shader_preset_parameters(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_SHADER_PARAMETERS_PRESET);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_video_shader_parameters(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_SHADER_PARAMETERS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_settings(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_SETTINGS_ALL);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_category(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_SETTINGS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_shader_options(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OPTIONS_SHADERS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_options(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OPTIONS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-06-22 20:10:14 +00:00
|
|
|
static int deferred_push_content_settings(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CONTENT_SETTINGS);
|
2015-06-22 20:10:14 +00:00
|
|
|
}
|
|
|
|
|
2015-07-03 23:51:41 +00:00
|
|
|
static int deferred_push_add_content_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_ADD_CONTENT_LIST);
|
2015-07-03 23:51:41 +00:00
|
|
|
}
|
|
|
|
|
2015-06-22 06:46:42 +00:00
|
|
|
static int deferred_push_load_content_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_LOAD_CONTENT_LIST);
|
2015-06-22 06:46:42 +00:00
|
|
|
}
|
|
|
|
|
2015-06-24 02:56:44 +00:00
|
|
|
static int deferred_push_information_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_INFORMATION_LIST);
|
2015-06-24 02:56:44 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_management_options(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OPTIONS_MANAGEMENT);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_counters(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_PERFCOUNTERS_CORE);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_frontend_counters(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_PERFCOUNTERS_FRONTEND);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_cheat_options(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OPTIONS_CHEATS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_input_remapping_options(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OPTIONS_REMAPPINGS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_options(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CORE_OPTIONS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_disk_options(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OPTIONS_DISK);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef HAVE_NETWORKING
|
|
|
|
/* HACK - we have to find some way to pass state inbetween
|
|
|
|
* function pointer callback functions that don't necessarily
|
|
|
|
* call each other. */
|
2015-05-12 13:56:49 +00:00
|
|
|
char *core_buf;
|
|
|
|
size_t core_len;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-11-23 14:13:26 +00:00
|
|
|
void cb_net_generic(void *task_data, void *user_data, const char *err)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-12-12 01:14:50 +00:00
|
|
|
bool refresh = false;
|
2015-11-23 14:13:26 +00:00
|
|
|
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
|
|
|
|
|
2015-04-15 07:55:23 +00:00
|
|
|
if (core_buf)
|
|
|
|
free(core_buf);
|
|
|
|
|
2015-11-27 16:45:20 +00:00
|
|
|
core_buf = NULL;
|
|
|
|
core_len = 0;
|
|
|
|
|
2015-12-10 14:40:44 +00:00
|
|
|
if (!data || err)
|
2015-11-27 16:45:20 +00:00
|
|
|
goto finish;
|
|
|
|
|
2015-11-23 14:13:26 +00:00
|
|
|
core_buf = (char*)malloc((data->len+1) * sizeof(char));
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-02-27 08:25:09 +00:00
|
|
|
if (!core_buf)
|
2015-11-23 14:13:26 +00:00
|
|
|
goto finish;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-11-23 14:13:26 +00:00
|
|
|
memcpy(core_buf, data->data, data->len * sizeof(char));
|
|
|
|
core_buf[data->len] = '\0';
|
|
|
|
core_len = data->len;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-11-27 16:45:20 +00:00
|
|
|
finish:
|
2015-12-12 14:21:20 +00:00
|
|
|
refresh = true;
|
2015-12-12 01:14:50 +00:00
|
|
|
menu_entries_ctl(MENU_ENTRIES_CTL_UNSET_REFRESH, &refresh);
|
2015-02-27 07:52:44 +00:00
|
|
|
|
2015-11-24 01:30:57 +00:00
|
|
|
if (err)
|
|
|
|
RARCH_ERR("Download failed: %s\n", err);
|
|
|
|
|
2015-11-23 14:13:26 +00:00
|
|
|
if (data)
|
|
|
|
{
|
|
|
|
if (data->data)
|
|
|
|
free(data->data);
|
|
|
|
free(data);
|
|
|
|
}
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-11-27 22:43:24 +00:00
|
|
|
static void cb_decompressed(void *task_data, void *user_data, const char *err)
|
2015-07-04 01:37:43 +00:00
|
|
|
{
|
2015-11-27 22:43:24 +00:00
|
|
|
decompress_task_data_t *dec = (decompress_task_data_t*)task_data;
|
|
|
|
unsigned type_hash = (uintptr_t)user_data;
|
2015-11-23 14:13:26 +00:00
|
|
|
|
2015-11-27 22:43:24 +00:00
|
|
|
if (dec && !err)
|
|
|
|
{
|
|
|
|
if (type_hash == CB_CORE_UPDATER_DOWNLOAD)
|
|
|
|
event_command(EVENT_CMD_CORE_INFO_INIT);
|
2015-11-30 04:38:00 +00:00
|
|
|
else if (type_hash == CB_UPDATE_ASSETS)
|
|
|
|
event_command(EVENT_CMD_REINIT);
|
2015-11-27 22:43:24 +00:00
|
|
|
}
|
2015-11-23 14:13:26 +00:00
|
|
|
|
2015-11-27 22:43:24 +00:00
|
|
|
if (err)
|
|
|
|
RARCH_ERR("%s", err);
|
2015-11-23 14:13:26 +00:00
|
|
|
|
2015-11-27 22:43:24 +00:00
|
|
|
if (dec)
|
|
|
|
{
|
|
|
|
if (path_file_exists(dec->source_file))
|
|
|
|
remove(dec->source_file);
|
2015-11-23 14:13:26 +00:00
|
|
|
|
2015-11-27 22:43:24 +00:00
|
|
|
free(dec->source_file);
|
|
|
|
free(dec);
|
|
|
|
}
|
2015-07-04 01:37:43 +00:00
|
|
|
}
|
|
|
|
|
2015-11-23 14:13:26 +00:00
|
|
|
/* expects http_transfer_t*, menu_file_transfer_t* */
|
|
|
|
void cb_generic_download(void *task_data, void *user_data, const char *err)
|
2015-11-25 02:33:54 +00:00
|
|
|
#if 0
|
|
|
|
(void *data, size_t len, const char *dir_path)
|
|
|
|
#endif
|
2015-11-23 14:13:26 +00:00
|
|
|
{
|
|
|
|
char output_path[PATH_MAX_LENGTH];
|
|
|
|
char shaderdir[PATH_MAX_LENGTH];
|
|
|
|
const char *file_ext = NULL;
|
|
|
|
const char *dir_path = NULL;
|
|
|
|
menu_file_transfer_t *transf = (menu_file_transfer_t*)user_data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
|
|
|
|
|
|
|
|
if (!data || !data->data | !transf)
|
|
|
|
goto finish;
|
|
|
|
|
|
|
|
/* we have to determine dir_path at the time of writting or else
|
|
|
|
* we'd run into races when the user changes the setting during an
|
|
|
|
* http transfer. */
|
|
|
|
switch (transf->type_hash)
|
|
|
|
{
|
|
|
|
case CB_CORE_UPDATER_DOWNLOAD:
|
|
|
|
dir_path = settings->libretro_directory;
|
|
|
|
break;
|
|
|
|
case CB_CORE_CONTENT_DOWNLOAD:
|
|
|
|
dir_path = settings->core_assets_directory;
|
|
|
|
break;
|
|
|
|
case CB_UPDATE_CORE_INFO_FILES:
|
|
|
|
dir_path = settings->libretro_info_path;
|
|
|
|
break;
|
|
|
|
case CB_UPDATE_ASSETS:
|
|
|
|
dir_path = settings->assets_directory;
|
|
|
|
break;
|
|
|
|
case CB_UPDATE_AUTOCONFIG_PROFILES:
|
|
|
|
dir_path = settings->input.autoconfig_dir;
|
|
|
|
break;
|
|
|
|
case CB_UPDATE_DATABASES:
|
|
|
|
dir_path = settings->content_database;
|
|
|
|
break;
|
|
|
|
case CB_UPDATE_OVERLAYS:
|
|
|
|
dir_path = settings->overlay_directory;
|
|
|
|
break;
|
|
|
|
case CB_UPDATE_CHEATS:
|
|
|
|
dir_path = settings->cheat_database;
|
|
|
|
break;
|
|
|
|
case CB_UPDATE_SHADERS_CG:
|
|
|
|
case CB_UPDATE_SHADERS_GLSL:
|
|
|
|
{
|
|
|
|
const char *dirname = transf->type_hash == CB_UPDATE_SHADERS_CG ?
|
|
|
|
"shaders_cg" : "shaders_glsl";
|
|
|
|
|
|
|
|
fill_pathname_join(shaderdir, settings->video.shader_dir, dirname,
|
|
|
|
sizeof(shaderdir));
|
|
|
|
if (!path_file_exists(shaderdir))
|
|
|
|
if (!path_mkdir(shaderdir))
|
|
|
|
goto finish;
|
2015-11-26 02:25:22 +00:00
|
|
|
|
|
|
|
dir_path = shaderdir;
|
2015-11-23 14:13:26 +00:00
|
|
|
break;
|
|
|
|
}
|
2015-12-24 19:13:50 +00:00
|
|
|
case CB_LAKKA_DOWNLOAD:
|
|
|
|
dir_path = "/storage/.update/"; /* TODO unhardcode this ? */
|
|
|
|
break;
|
2015-11-23 14:13:26 +00:00
|
|
|
default:
|
|
|
|
RARCH_WARN("Unknown transfer type '%u' bailing out.\n", transf->type_hash);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-11-28 20:13:27 +00:00
|
|
|
fill_pathname_join(output_path, dir_path,
|
|
|
|
transf->path, sizeof(output_path));
|
|
|
|
|
|
|
|
/* Make sure the directory exists */
|
|
|
|
path_basedir(output_path);
|
|
|
|
if (!path_mkdir(output_path))
|
|
|
|
{
|
|
|
|
err = "Failed to create the directory.";
|
|
|
|
goto finish;
|
|
|
|
}
|
|
|
|
|
2015-11-23 14:13:26 +00:00
|
|
|
fill_pathname_join(output_path, dir_path,
|
|
|
|
transf->path, sizeof(output_path));
|
|
|
|
|
|
|
|
if (!retro_write_file(output_path, data->data, data->len))
|
2015-11-28 19:08:55 +00:00
|
|
|
{
|
|
|
|
err = "Write failed.";
|
2015-11-23 14:13:26 +00:00
|
|
|
goto finish;
|
2015-11-28 19:08:55 +00:00
|
|
|
}
|
2015-11-23 14:13:26 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_ZLIB
|
|
|
|
file_ext = path_get_extension(output_path);
|
|
|
|
|
|
|
|
if (!settings->network.buildbot_auto_extract_archive)
|
|
|
|
goto finish;
|
|
|
|
|
|
|
|
if (!strcasecmp(file_ext, "zip"))
|
|
|
|
{
|
2015-12-02 05:06:15 +00:00
|
|
|
rarch_task_push_decompress(output_path, dir_path, NULL, NULL,
|
2015-11-30 13:02:36 +00:00
|
|
|
cb_decompressed, (void*)(uintptr_t)transf->type_hash);
|
2015-11-27 22:43:24 +00:00
|
|
|
}
|
|
|
|
#else
|
2015-11-23 14:13:26 +00:00
|
|
|
if (transf->type_hash == CB_CORE_UPDATER_DOWNLOAD)
|
|
|
|
event_command(EVENT_CMD_CORE_INFO_INIT);
|
2015-11-27 22:43:24 +00:00
|
|
|
#endif
|
2015-11-23 14:13:26 +00:00
|
|
|
|
|
|
|
finish:
|
2015-11-24 01:30:57 +00:00
|
|
|
if (err)
|
|
|
|
{
|
|
|
|
RARCH_ERR("Download of '%s' failed: %s\n",
|
|
|
|
(transf ? transf->path: "unknown"), err);
|
|
|
|
}
|
|
|
|
|
2015-11-23 14:13:26 +00:00
|
|
|
if (data)
|
|
|
|
{
|
|
|
|
if (data->data)
|
|
|
|
free(data->data);
|
|
|
|
free(data);
|
|
|
|
}
|
|
|
|
|
2015-11-24 01:30:57 +00:00
|
|
|
if (transf)
|
|
|
|
free(transf);
|
2015-07-04 01:37:43 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_updater_list(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CORES_UPDATER);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
2015-07-04 01:37:43 +00:00
|
|
|
|
|
|
|
static int deferred_push_core_content_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CORE_CONTENT);
|
2015-07-04 01:37:43 +00:00
|
|
|
}
|
2015-12-24 19:13:50 +00:00
|
|
|
|
|
|
|
static int deferred_push_lakka_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_LAKKA);
|
|
|
|
}
|
|
|
|
|
2015-03-01 03:40:15 +00:00
|
|
|
#endif
|
|
|
|
|
2015-07-14 10:49:54 +00:00
|
|
|
static int deferred_archive_action_detect_core(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_ARCHIVE_ACTION_DETECT_CORE);
|
2015-07-14 10:49:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int deferred_archive_action(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_ARCHIVE_ACTION);
|
2015-07-14 10:49:54 +00:00
|
|
|
}
|
|
|
|
|
2015-09-01 18:27:14 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PUSH_ARCHIVE_OPEN_DETECT_CORE = 0,
|
|
|
|
PUSH_ARCHIVE_OPEN,
|
2015-09-01 22:10:40 +00:00
|
|
|
PUSH_DEFAULT,
|
2015-09-06 21:43:27 +00:00
|
|
|
PUSH_DETECT_CORE_LIST
|
2015-09-01 18:27:14 +00:00
|
|
|
};
|
|
|
|
|
2015-09-01 22:10:40 +00:00
|
|
|
|
2015-09-01 18:41:58 +00:00
|
|
|
static int general_push(menu_displaylist_info_t *info, unsigned id, unsigned type)
|
2015-07-14 10:49:54 +00:00
|
|
|
{
|
2015-12-10 22:08:34 +00:00
|
|
|
struct retro_system_info *system_menu = NULL;
|
2015-07-14 10:49:54 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-12-10 21:30:25 +00:00
|
|
|
rarch_system_info_t *system = NULL;
|
2015-09-14 20:44:39 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
|
|
|
const char *exts = core_info_list_get_all_extensions();
|
2015-07-14 10:49:54 +00:00
|
|
|
|
2015-12-10 22:08:34 +00:00
|
|
|
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &system_menu);
|
2015-12-10 21:30:25 +00:00
|
|
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
|
|
|
|
2015-09-01 22:10:40 +00:00
|
|
|
switch (id)
|
2015-09-01 18:27:14 +00:00
|
|
|
{
|
2015-09-01 22:10:40 +00:00
|
|
|
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;
|
2015-09-01 18:27:14 +00:00
|
|
|
}
|
2015-07-14 10:49:54 +00:00
|
|
|
|
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
|
|
|
|
2015-09-01 17:22:33 +00:00
|
|
|
switch (id)
|
2015-07-14 10:49:54 +00:00
|
|
|
{
|
2015-09-01 18:27:14 +00:00
|
|
|
case PUSH_ARCHIVE_OPEN_DETECT_CORE:
|
2015-09-01 22:10:40 +00:00
|
|
|
info->setting = menu_setting_find(info->label);
|
2015-09-14 20:44:39 +00:00
|
|
|
|
|
|
|
if (exts)
|
|
|
|
strlcpy(info->exts, exts, sizeof(info->exts));
|
2015-12-10 22:08:34 +00:00
|
|
|
else if (system_menu->valid_extensions)
|
2015-09-01 17:22:33 +00:00
|
|
|
{
|
2015-12-10 22:08:34 +00:00
|
|
|
if (*system_menu->valid_extensions)
|
|
|
|
strlcpy(info->exts, system_menu->valid_extensions,
|
2015-09-01 17:22:33 +00:00
|
|
|
sizeof(info->exts));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
|
|
|
break;
|
2015-09-01 18:27:14 +00:00
|
|
|
case PUSH_ARCHIVE_OPEN:
|
2015-09-01 22:10:40 +00:00
|
|
|
info->setting = menu_setting_find(info->label);
|
2015-12-10 22:08:34 +00:00
|
|
|
if (system_menu->valid_extensions)
|
2015-09-01 17:22:33 +00:00
|
|
|
{
|
2015-12-10 22:08:34 +00:00
|
|
|
if (*system_menu->valid_extensions)
|
|
|
|
strlcpy(info->exts, system_menu->valid_extensions,
|
2015-09-01 17:22:33 +00:00
|
|
|
sizeof(info->exts));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
|
|
|
break;
|
2015-09-01 18:27:14 +00:00
|
|
|
case PUSH_DEFAULT:
|
2015-09-01 22:10:40 +00:00
|
|
|
info->setting = menu_setting_find(info->label);
|
2015-10-11 11:16:38 +00:00
|
|
|
if (menu_setting_get_browser_selection_type(info->setting) == ST_DIR)
|
|
|
|
{
|
|
|
|
}
|
2015-12-10 22:08:34 +00:00
|
|
|
else if (system_menu->valid_extensions)
|
2015-09-01 18:27:14 +00:00
|
|
|
{
|
2015-12-10 22:08:34 +00:00
|
|
|
if (*system_menu->valid_extensions)
|
|
|
|
strlcpy(info->exts, system_menu->valid_extensions,
|
2015-09-01 18:27:14 +00:00
|
|
|
sizeof(info->exts));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
|
|
|
break;
|
2015-09-01 22:10:40 +00:00
|
|
|
case PUSH_DETECT_CORE_LIST:
|
2015-09-14 20:44:39 +00:00
|
|
|
if (exts)
|
|
|
|
strlcpy(info->exts, exts, sizeof(info->exts));
|
2015-09-01 22:10:40 +00:00
|
|
|
break;
|
2015-07-14 10:49:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
(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
|
|
|
|
}
|
|
|
|
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, type);
|
2015-07-14 10:49:54 +00:00
|
|
|
}
|
|
|
|
|
2015-09-01 22:10:40 +00:00
|
|
|
static int deferred_push_detect_core_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return general_push(info, PUSH_DETECT_CORE_LIST, DISPLAYLIST_CORES_DETECTED);
|
|
|
|
}
|
|
|
|
|
2015-09-01 17:22:33 +00:00
|
|
|
static int deferred_archive_open_detect_core(menu_displaylist_info_t *info)
|
2015-07-14 10:49:54 +00:00
|
|
|
{
|
2015-09-01 18:41:58 +00:00
|
|
|
return general_push(info, PUSH_ARCHIVE_OPEN_DETECT_CORE, DISPLAYLIST_DEFAULT);
|
2015-09-01 17:22:33 +00:00
|
|
|
}
|
2015-07-14 10:49:54 +00:00
|
|
|
|
2015-09-01 17:22:33 +00:00
|
|
|
static int deferred_archive_open(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-09-01 18:41:58 +00:00
|
|
|
return general_push(info, PUSH_ARCHIVE_OPEN, DISPLAYLIST_DEFAULT);
|
2015-09-01 18:27:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int deferred_push_default(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-09-01 18:41:58 +00:00
|
|
|
return general_push(info, PUSH_DEFAULT, DISPLAYLIST_DEFAULT);
|
2015-07-14 10:49:54 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_history_list(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_HISTORY);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
int deferred_push_content_list(void *data, void *userdata, const char *path,
|
|
|
|
const char *label, unsigned type)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-27 09:10:33 +00:00
|
|
|
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
2015-10-17 17:24:58 +00:00
|
|
|
return action_refresh_default((file_list_t*)data, selection_buf);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_database_manager_list(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_DATABASES);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_cursor_manager_list(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_DATABASE_CURSORS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-21 20:22:37 +00:00
|
|
|
static int deferred_push_content_collection_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_DATABASE_PLAYLISTS);
|
2015-05-21 20:22:37 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_core_list(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CORES);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_configurations(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CONFIG_FILES);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_video_shader_preset(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_SHADER_PRESET);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_video_shader_pass(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_SHADER_PASS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_video_filter(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_VIDEO_FILTERS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_images(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_IMAGES);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_audio_dsp_plugin(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_AUDIO_FILTERS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_cheat_file_load(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CHEAT_FILES);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_remap_file_load(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_REMAP_FILES);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_record_configfile(menu_displaylist_info_t *info)
|
2015-04-15 08:55:23 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_RECORD_CONFIG_FILES);
|
2015-04-15 08:55:23 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_input_overlay(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OVERLAYS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_input_osk_overlay(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_OVERLAYS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_video_font_path(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_FONTS);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_content_history_path(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
return deferred_push_dlist(info, DISPLAYLIST_CONTENT_HISTORY);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
static int menu_cbs_init_bind_deferred_push_compare_label(menu_file_list_cbs_t *cbs,
|
2015-06-07 16:07:25 +00:00
|
|
|
const char *label, uint32_t label_hash)
|
|
|
|
{
|
2015-06-19 04:08:08 +00:00
|
|
|
if (strstr(label, menu_hash_to_str(MENU_LABEL_DEFERRED_RDB_ENTRY_DETAIL)))
|
2015-10-11 19:08:07 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rdb_entry_detail);
|
|
|
|
}
|
2015-07-23 17:44:59 +00:00
|
|
|
else if (strstr(label, menu_hash_to_str(MENU_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)))
|
2015-10-11 19:08:07 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rpl_entry_actions);
|
|
|
|
}
|
2015-06-07 15:10:06 +00:00
|
|
|
else
|
2015-06-07 15:14:39 +00:00
|
|
|
{
|
|
|
|
switch (label_hash)
|
|
|
|
{
|
2015-10-23 04:54:33 +00:00
|
|
|
case MENU_LABEL_DEFERRED_USER_BINDS_LIST:
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_user_binds_list);
|
|
|
|
break;
|
2015-10-17 13:28:16 +00:00
|
|
|
case MENU_LABEL_DEFERRED_ACCOUNTS_LIST:
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_accounts_list);
|
|
|
|
break;
|
2015-10-24 08:31:11 +00:00
|
|
|
case MENU_LABEL_DEFERRED_INPUT_SETTINGS_LIST:
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_settings_list);
|
|
|
|
break;
|
2015-10-25 09:25:07 +00:00
|
|
|
case MENU_LABEL_DEFERRED_PLAYLIST_SETTINGS_LIST:
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_playlist_settings_list);
|
|
|
|
break;
|
2015-10-25 09:41:53 +00:00
|
|
|
case MENU_LABEL_DEFERRED_INPUT_HOTKEY_BINDS_LIST:
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_hotkey_binds_list);
|
|
|
|
break;
|
2015-10-17 13:58:59 +00:00
|
|
|
case MENU_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST:
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_accounts_cheevos_list);
|
|
|
|
break;
|
2015-07-14 10:49:54 +00:00
|
|
|
case MENU_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_action_detect_core);
|
2015-07-14 10:49:54 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_ARCHIVE_ACTION:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_action);
|
2015-07-14 10:49:54 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_open_detect_core);
|
2015-07-14 10:49:54 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_ARCHIVE_OPEN:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_open);
|
2015-07-14 10:49:54 +00:00
|
|
|
break;
|
2015-07-04 01:37:43 +00:00
|
|
|
case MENU_LABEL_DEFERRED_CORE_CONTENT_LIST:
|
|
|
|
#ifdef HAVE_NETWORKING
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_content_list);
|
2015-07-04 01:37:43 +00:00
|
|
|
#endif
|
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST:
|
|
|
|
#ifdef HAVE_NETWORKING
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_updater_list);
|
2015-12-24 19:13:50 +00:00
|
|
|
#endif
|
2015-12-25 14:16:32 +00:00
|
|
|
break;
|
2015-12-24 19:13:50 +00:00
|
|
|
case MENU_LABEL_DEFERRED_LAKKA_LIST:
|
|
|
|
#ifdef HAVE_NETWORKING
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_lakka_list);
|
2015-06-07 15:14:39 +00:00
|
|
|
#endif
|
|
|
|
break;
|
2015-06-19 14:56:01 +00:00
|
|
|
case MENU_LABEL_LOAD_CONTENT_HISTORY:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_history_list);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_database_manager_list);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CHEAT_FILE_LOAD:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cheat_file_load);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_REMAP_FILE_LOAD:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_remap_file_load);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_RECORD_CONFIG:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_record_configfile);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_SHADER_OPTIONS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_shader_options);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
2015-06-24 11:36:58 +00:00
|
|
|
case MENU_LABEL_ONLINE_UPDATER:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_options);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
2015-06-22 20:10:14 +00:00
|
|
|
case MENU_LABEL_CONTENT_SETTINGS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_content_settings);
|
2015-06-22 20:10:14 +00:00
|
|
|
break;
|
2015-07-03 23:51:41 +00:00
|
|
|
case MENU_LABEL_ADD_CONTENT_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_add_content_list);
|
2015-07-03 23:51:41 +00:00
|
|
|
break;
|
2015-06-22 06:46:42 +00:00
|
|
|
case MENU_LABEL_LOAD_CONTENT_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_load_content_list);
|
2015-06-22 06:46:42 +00:00
|
|
|
break;
|
2015-06-24 02:56:44 +00:00
|
|
|
case MENU_LABEL_INFORMATION_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_information_list);
|
2015-06-24 02:56:44 +00:00
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_MANAGEMENT:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_management_options);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
2015-07-17 18:33:09 +00:00
|
|
|
case MENU_LABEL_HELP_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_help);
|
2015-07-17 18:33:09 +00:00
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_DEFERRED_CORE_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_list_deferred);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
2015-06-07 21:26:29 +00:00
|
|
|
case MENU_LABEL_DEFERRED_CORE_LIST_SET:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_collection_list_deferred);
|
2015-06-07 21:26:29 +00:00
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_DEFERRED_VIDEO_FILTER:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_filter);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_database_manager_list_deferred);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH:
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_subsearch);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_INFORMATION:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_information);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_SYSTEM_INFORMATION:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_system_information);
|
2015-09-24 11:37:25 +00:00
|
|
|
break;
|
2015-09-24 01:48:08 +00:00
|
|
|
case MENU_LABEL_DEBUG_INFORMATION:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_debug_information);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
2015-11-08 02:58:50 +00:00
|
|
|
case MENU_LABEL_ACHIEVEMENT_LIST:
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list);
|
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_CORE_COUNTERS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_counters);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
2015-06-24 02:56:44 +00:00
|
|
|
case MENU_LABEL_FRONTEND_COUNTERS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frontend_counters);
|
2015-06-24 02:56:44 +00:00
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_preset_parameters);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_parameters);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_SETTINGS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_settings);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_OPTIONS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_options);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_cheat_options);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_input_remapping_options);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_list);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_content_collection_list);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CONFIGURATIONS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_configurations);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_PRESET:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_preset);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_PASS:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_pass);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_FILTER:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_filter);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_MENU_WALLPAPER:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_images);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_AUDIO_DSP_PLUGIN:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_dsp_plugin);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_OVERLAY:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_overlay);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_OSK_OVERLAY:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_osk_overlay);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_FONT_PATH:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_font_path);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CONTENT_HISTORY_PATH:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_content_history_path);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
2015-07-04 05:09:54 +00:00
|
|
|
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_DETECT_CORE_LIST:
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_detect_core_list);
|
2015-06-07 15:14:39 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
2015-06-07 15:10:06 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
static int menu_cbs_init_bind_deferred_push_compare_type(menu_file_list_cbs_t *cbs, unsigned type,
|
2015-06-07 22:09:12 +00:00
|
|
|
uint32_t label_hash)
|
|
|
|
{
|
|
|
|
if (type == MENU_SETTING_GROUP)
|
2015-10-11 19:08:07 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_category);
|
|
|
|
}
|
2015-06-07 22:09:12 +00:00
|
|
|
else if (type == MENU_FILE_PLAYLIST_COLLECTION)
|
2015-10-11 19:08:07 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rdb_collection);
|
|
|
|
}
|
2015-06-25 07:15:34 +00:00
|
|
|
else if (type == MENU_SETTING_ACTION_CORE_DISK_OPTIONS)
|
2015-10-11 19:08:07 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_disk_options);
|
|
|
|
}
|
2015-06-07 22:09:12 +00:00
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
int menu_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
2015-02-26 16:33:00 +00:00
|
|
|
const char *path, const char *label, unsigned type, size_t idx,
|
2015-06-05 11:17:44 +00:00
|
|
|
const char *elem0, const char *elem1,
|
|
|
|
uint32_t label_hash, uint32_t menu_label_hash)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
|
|
|
if (!cbs)
|
2015-06-07 16:36:10 +00:00
|
|
|
return -1;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-10-11 19:08:07 +00:00
|
|
|
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_default);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
if (menu_cbs_init_bind_deferred_push_compare_label(cbs, label, label_hash) == 0)
|
2015-06-07 16:36:10 +00:00
|
|
|
return 0;
|
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
if (menu_cbs_init_bind_deferred_push_compare_type(cbs, type, label_hash) == 0)
|
2015-06-07 16:36:10 +00:00
|
|
|
return 0;
|
2015-06-05 10:54:58 +00:00
|
|
|
|
2015-06-07 16:36:10 +00:00
|
|
|
return -1;
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|