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-06-05 07:31:07 +00:00
|
|
|
|
2015-06-08 12:35:58 +00:00
|
|
|
#include "../menu.h"
|
2015-06-26 13:28:01 +00:00
|
|
|
#include "../menu_cbs.h"
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "../menu_hash.h"
|
2015-06-08 12:35:58 +00:00
|
|
|
#include "../menu_displaylist.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-06-13 17:12:10 +00:00
|
|
|
#include "../../general.h"
|
2015-06-08 12:35:58 +00:00
|
|
|
#include "../../file_ext.h"
|
|
|
|
#include "../../gfx/video_shader_driver.h"
|
2015-03-07 22:31:16 +00:00
|
|
|
|
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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_SYSTEM_INFO);
|
2015-04-16 17:36:34 +00:00
|
|
|
}
|
|
|
|
|
2015-05-21 22:28:02 +00:00
|
|
|
static int deferred_push_rdb_collection(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
/* TODO/FIXME - add path? */
|
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_PLAYLIST_COLLECTION);
|
|
|
|
}
|
|
|
|
|
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-05-13 11:45:53 +00:00
|
|
|
int ret;
|
2015-05-13 14:18:43 +00:00
|
|
|
struct string_list *str_list = string_split(info->label, "|");
|
2015-02-26 16:33:00 +00:00
|
|
|
|
|
|
|
if (!str_list)
|
|
|
|
return -1;
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
strlcpy(info->path_b, str_list->elems[1].data, sizeof(info->path_b));
|
|
|
|
strlcpy(info->label, str_list->elems[0].data, sizeof(info->label));
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
ret = menu_displaylist_push_list(info, DISPLAYLIST_DATABASE_ENTRY);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
|
|
|
string_list_free(str_list);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
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-06-07 17:46:03 +00:00
|
|
|
return menu_displaylist_push_list(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)
|
|
|
|
{
|
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_CORES_COLLECTION_SUPPORTED);
|
|
|
|
}
|
|
|
|
|
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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-06-12 15:23:31 +00:00
|
|
|
char *query = NULL;
|
|
|
|
char *rdb = NULL;
|
|
|
|
char rdb_path[PATH_MAX_LENGTH] = {0};
|
|
|
|
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-02-26 16:33:00 +00:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (!config_get_string(conf, "query", &query))
|
2015-04-02 12:45:08 +00:00
|
|
|
{
|
|
|
|
config_file_free(conf);
|
2015-02-26 16:33:00 +00:00
|
|
|
return -1;
|
2015-04-02 12:45:08 +00:00
|
|
|
}
|
2015-02-26 16:33:00 +00:00
|
|
|
|
|
|
|
if (!config_get_string(conf, "rdb", &rdb))
|
2015-04-02 12:45:08 +00:00
|
|
|
{
|
|
|
|
config_file_free(conf);
|
2015-02-26 16:33:00 +00:00
|
|
|
return -1;
|
2015-04-02 12:45:08 +00:00
|
|
|
}
|
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-05-13 14:18:43 +00:00
|
|
|
menu_displaylist_push_list(info, DISPLAYLIST_DATABASE_QUERY);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-04-02 12:45:08 +00:00
|
|
|
config_file_free(conf);
|
2015-02-26 16:33:00 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
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-05-25 05:46:56 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-05-12 13:04:20 +00:00
|
|
|
int ret;
|
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
|
|
|
|
|
|
|
if (query[0] == '\0')
|
|
|
|
{
|
|
|
|
string_list_free(str_list);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
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-05-13 14:18:43 +00:00
|
|
|
ret = menu_displaylist_push_list(info, DISPLAYLIST_DATABASE_QUERY);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
|
|
|
string_list_free(str_list);
|
|
|
|
|
2015-05-12 13:04:20 +00:00
|
|
|
return ret;
|
2015-05-25 05:46:56 +00:00
|
|
|
#else
|
|
|
|
return 0;
|
|
|
|
#endif
|
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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_SETTINGS_ALL);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_settings_subgroup(menu_displaylist_info_t *info)
|
2015-05-13 10:52:29 +00:00
|
|
|
{
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_SETTINGS_SUBGROUP);
|
2015-05-13 10:52:29 +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-05-13 14:18:43 +00:00
|
|
|
info->flags = SL_FLAG_ALL_SETTINGS;
|
2015-05-12 08:57:00 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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)
|
|
|
|
{
|
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_CONTENT_SETTINGS);
|
|
|
|
}
|
|
|
|
|
2015-06-22 06:46:42 +00:00
|
|
|
static int deferred_push_load_content_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_LOAD_CONTENT_LIST);
|
|
|
|
}
|
|
|
|
|
2015-06-24 02:56:44 +00:00
|
|
|
static int deferred_push_information_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_INFORMATION_LIST);
|
|
|
|
}
|
|
|
|
|
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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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
|
|
|
|
|
|
|
int cb_core_updater_list(void *data_, size_t len)
|
|
|
|
{
|
2015-06-12 15:23:31 +00:00
|
|
|
char *data = (char*)data_;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-02-26 16:33:00 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (!data)
|
|
|
|
return -1;
|
|
|
|
|
2015-04-15 07:55:23 +00:00
|
|
|
if (core_buf)
|
|
|
|
free(core_buf);
|
|
|
|
|
2015-05-19 19:59:36 +00:00
|
|
|
core_buf = (char*)malloc((len+1) * sizeof(char));
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-02-27 08:25:09 +00:00
|
|
|
if (!core_buf)
|
2015-02-26 16:33:00 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-02-27 08:25:09 +00:00
|
|
|
memcpy(core_buf, data, len * sizeof(char));
|
2015-05-19 19:59:36 +00:00
|
|
|
core_buf[len] = '\0';
|
2015-02-27 08:25:09 +00:00
|
|
|
core_len = len;
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-06-16 01:07:44 +00:00
|
|
|
menu_entries_unset_nonblocking_refresh();
|
2015-02-27 07:52:44 +00:00
|
|
|
|
2015-02-26 16:33:00 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_CORES_UPDATER);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
2015-03-01 03:40:15 +00:00
|
|
|
#endif
|
|
|
|
|
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-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-12 13:30:50 +00:00
|
|
|
menu_list_t *menu_list = menu_list_get_ptr();
|
|
|
|
if (!menu_list)
|
2015-02-26 16:33:00 +00:00
|
|
|
return -1;
|
2015-05-12 13:30:50 +00:00
|
|
|
return menu_displaylist_push((file_list_t*)data, menu_list->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-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-05-12 10:19:58 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_RDB;
|
|
|
|
strlcpy(info->exts, "rdb", sizeof(info->exts));
|
|
|
|
strlcpy(info->path, settings->content_database, sizeof(info->path));
|
2015-05-12 10:19:58 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-05-12 10:19:58 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_CURSOR;
|
|
|
|
strlcpy(info->exts, "dbc", sizeof(info->exts));
|
|
|
|
strlcpy(info->path, settings->cursor_directory, sizeof(info->path));
|
2015-05-12 10:19:58 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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)
|
|
|
|
{
|
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
2015-06-08 21:38:03 +00:00
|
|
|
strlcpy(info->exts, "lpl", sizeof(info->exts));
|
2015-05-21 20:22:37 +00:00
|
|
|
|
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_DATABASE_PLAYLISTS);
|
|
|
|
}
|
|
|
|
|
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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
|
|
|
strlcpy(info->exts, EXT_EXECUTABLES, sizeof(info->exts));
|
2015-05-12 09:06:04 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_CONFIG;
|
|
|
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
2015-05-12 10:32:24 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_SHADER_PRESET;
|
|
|
|
strlcpy(info->exts, "cgp|glslp", sizeof(info->exts));
|
2015-05-12 10:14:58 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_SHADER;
|
|
|
|
strlcpy(info->exts, "cg|glsl", sizeof(info->exts));
|
2015-05-12 10:14:58 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_VIDEOFILTER;
|
|
|
|
strlcpy(info->exts, "filt", sizeof(info->exts));
|
2015-05-12 10:23:27 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_IMAGE;
|
|
|
|
strlcpy(info->exts, "png", sizeof(info->exts));
|
2015-05-12 10:23:27 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_AUDIOFILTER;
|
|
|
|
strlcpy(info->exts, "dsp", sizeof(info->exts));
|
2015-05-12 10:26:51 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_CHEAT;
|
|
|
|
strlcpy(info->exts, "cht", sizeof(info->exts));
|
2015-05-12 10:26:51 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_REMAP;
|
|
|
|
strlcpy(info->exts, "rmp", sizeof(info->exts));
|
2015-05-12 10:26:51 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_RECORD_CONFIG;
|
|
|
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
2015-05-12 10:32:24 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_OVERLAY;
|
|
|
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
2015-05-12 10:32:24 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_OVERLAY;
|
|
|
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
2015-05-12 10:32:24 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_FONT;
|
|
|
|
strlcpy(info->exts, "ttf", sizeof(info->exts));
|
2015-05-12 10:32:24 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(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-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
2015-06-08 21:38:03 +00:00
|
|
|
strlcpy(info->exts, "lpl", sizeof(info->exts));
|
2015-05-12 10:32:24 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_CONTENT_HISTORY);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_detect_core_list(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-06-23 05:09:24 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
2015-05-12 10:07:41 +00:00
|
|
|
if (global->core_info)
|
2015-05-13 14:18:43 +00:00
|
|
|
strlcpy(info->exts, core_info_list_get_all_extensions(
|
|
|
|
global->core_info), sizeof(info->exts));
|
2015-06-23 04:13:57 +00:00
|
|
|
|
2015-06-23 05:09:24 +00:00
|
|
|
(void)settings;
|
|
|
|
|
2015-06-28 15:21:32 +00:00
|
|
|
if (settings->multimedia.builtin_mediaplayer_enable ||
|
|
|
|
settings->multimedia.builtin_imageviewer_enable)
|
2015-06-23 04:13:57 +00:00
|
|
|
{
|
|
|
|
struct retro_system_info sysinfo = {0};
|
2015-06-28 16:57:06 +00:00
|
|
|
|
|
|
|
(void)sysinfo;
|
2015-06-28 15:21:32 +00:00
|
|
|
#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));
|
|
|
|
}
|
2015-06-28 16:55:00 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_IMAGEVIEWER
|
2015-06-28 15:21:32 +00:00
|
|
|
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));
|
|
|
|
}
|
2015-06-23 04:13:57 +00:00
|
|
|
#endif
|
2015-06-28 15:21:32 +00:00
|
|
|
}
|
2015-05-12 10:07:41 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_CORES_DETECTED);
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
static int deferred_push_default(menu_displaylist_info_t *info)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-06-25 11:46:32 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
|
|
|
info->setting = menu_setting_find(info->label);
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
if (info->setting && info->setting->browser_selection_type == ST_DIR) {}
|
2015-03-21 04:42:49 +00:00
|
|
|
else if (global->menu.info.valid_extensions)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
if (*global->menu.info.valid_extensions)
|
2015-06-22 00:46:45 +00:00
|
|
|
strlcpy(info->exts, global->menu.info.valid_extensions,
|
|
|
|
sizeof(info->exts));
|
2015-02-26 16:33:00 +00:00
|
|
|
}
|
|
|
|
else
|
2015-06-25 11:46:32 +00:00
|
|
|
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
2015-02-26 16:33:00 +00:00
|
|
|
|
2015-06-23 05:09:24 +00:00
|
|
|
(void)settings;
|
|
|
|
|
2015-06-28 15:21:32 +00:00
|
|
|
if (settings->multimedia.builtin_mediaplayer_enable ||
|
|
|
|
settings->multimedia.builtin_imageviewer_enable)
|
2015-06-23 04:13:57 +00:00
|
|
|
{
|
|
|
|
struct retro_system_info sysinfo = {0};
|
2015-06-28 16:57:06 +00:00
|
|
|
|
|
|
|
(void)sysinfo;
|
2015-06-28 15:21:32 +00:00
|
|
|
#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));
|
|
|
|
}
|
2015-06-23 04:13:57 +00:00
|
|
|
#endif
|
2015-06-28 16:55:00 +00:00
|
|
|
#ifdef HAVE_IMAGEVIEWER
|
2015-06-28 15:21:32 +00:00
|
|
|
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));
|
|
|
|
}
|
2015-06-28 16:55:00 +00:00
|
|
|
#endif
|
2015-06-28 15:21:32 +00:00
|
|
|
}
|
2015-06-23 04:13:57 +00:00
|
|
|
|
2015-05-13 14:18:43 +00:00
|
|
|
return menu_displaylist_push_list(info, DISPLAYLIST_DEFAULT);
|
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-06-07 16:07:25 +00:00
|
|
|
cbs->action_deferred_push = deferred_push_rdb_entry_detail;
|
2015-06-07 15:10:06 +00:00
|
|
|
else
|
2015-06-07 15:14:39 +00:00
|
|
|
{
|
|
|
|
switch (label_hash)
|
|
|
|
{
|
|
|
|
case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST:
|
|
|
|
#ifdef HAVE_NETWORKING
|
|
|
|
cbs->action_deferred_push = deferred_push_core_updater_list;
|
|
|
|
#endif
|
|
|
|
break;
|
2015-06-19 14:56:01 +00:00
|
|
|
case MENU_LABEL_LOAD_CONTENT_HISTORY:
|
2015-06-07 15:14:39 +00:00
|
|
|
cbs->action_deferred_push = deferred_push_history_list;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_database_manager_list;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_cursor_manager_list;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CHEAT_FILE_LOAD:
|
|
|
|
cbs->action_deferred_push = deferred_push_cheat_file_load;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_REMAP_FILE_LOAD:
|
|
|
|
cbs->action_deferred_push = deferred_push_remap_file_load;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_RECORD_CONFIG:
|
|
|
|
cbs->action_deferred_push = deferred_push_record_configfile;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_SHADER_OPTIONS:
|
|
|
|
cbs->action_deferred_push = deferred_push_shader_options;
|
|
|
|
break;
|
2015-06-24 11:36:58 +00:00
|
|
|
case MENU_LABEL_ONLINE_UPDATER:
|
2015-06-07 15:14:39 +00:00
|
|
|
cbs->action_deferred_push = deferred_push_options;
|
|
|
|
break;
|
2015-06-22 20:10:14 +00:00
|
|
|
case MENU_LABEL_CONTENT_SETTINGS:
|
|
|
|
cbs->action_deferred_push = deferred_push_content_settings;
|
|
|
|
break;
|
2015-06-22 06:46:42 +00:00
|
|
|
case MENU_LABEL_LOAD_CONTENT_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_load_content_list;
|
|
|
|
break;
|
2015-06-24 02:56:44 +00:00
|
|
|
case MENU_LABEL_INFORMATION_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_information_list;
|
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_MANAGEMENT:
|
|
|
|
cbs->action_deferred_push = deferred_push_management_options;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_CORE_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_list_deferred;
|
|
|
|
break;
|
2015-06-07 21:26:29 +00:00
|
|
|
case MENU_LABEL_DEFERRED_CORE_LIST_SET:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_collection_list_deferred;
|
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_DEFERRED_VIDEO_FILTER:
|
|
|
|
cbs->action_deferred_push = deferred_push_video_filter;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_database_manager_list_deferred;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred;
|
|
|
|
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:
|
|
|
|
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred_query_subsearch;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_INFORMATION:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_information;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_SYSTEM_INFORMATION:
|
|
|
|
cbs->action_deferred_push = deferred_push_system_information;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_COUNTERS:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_counters;
|
|
|
|
break;
|
2015-06-24 02:56:44 +00:00
|
|
|
case MENU_LABEL_FRONTEND_COUNTERS:
|
|
|
|
cbs->action_deferred_push = deferred_push_frontend_counters;
|
|
|
|
break;
|
2015-06-07 15:14:39 +00:00
|
|
|
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
|
|
|
cbs->action_deferred_push = deferred_push_video_shader_preset_parameters;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
|
|
|
cbs->action_deferred_push = deferred_push_video_shader_parameters;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_SETTINGS:
|
|
|
|
cbs->action_deferred_push = deferred_push_settings;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_OPTIONS:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_options;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_cheat_options;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_input_remapping_options;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_core_list;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_content_collection_list;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CONFIGURATIONS:
|
|
|
|
cbs->action_deferred_push = deferred_push_configurations;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_PRESET:
|
|
|
|
cbs->action_deferred_push = deferred_push_video_shader_preset;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_PASS:
|
|
|
|
cbs->action_deferred_push = deferred_push_video_shader_pass;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_FILTER:
|
|
|
|
cbs->action_deferred_push = deferred_push_video_filter;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_MENU_WALLPAPER:
|
|
|
|
cbs->action_deferred_push = deferred_push_images;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_AUDIO_DSP_PLUGIN:
|
|
|
|
cbs->action_deferred_push = deferred_push_audio_dsp_plugin;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_OVERLAY:
|
|
|
|
cbs->action_deferred_push = deferred_push_input_overlay;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_OSK_OVERLAY:
|
|
|
|
cbs->action_deferred_push = deferred_push_input_osk_overlay;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_FONT_PATH:
|
|
|
|
cbs->action_deferred_push = deferred_push_video_font_path;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_CONTENT_HISTORY_PATH:
|
|
|
|
cbs->action_deferred_push = deferred_push_content_history_path;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_DETECT_CORE_LIST:
|
|
|
|
cbs->action_deferred_push = deferred_push_detect_core_list;
|
|
|
|
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)
|
|
|
|
cbs->action_deferred_push = deferred_push_category;
|
|
|
|
else if (type == MENU_FILE_PLAYLIST_COLLECTION)
|
|
|
|
cbs->action_deferred_push = deferred_push_rdb_collection;
|
2015-06-25 07:15:34 +00:00
|
|
|
else if (type == MENU_SETTING_ACTION_CORE_DISK_OPTIONS)
|
|
|
|
cbs->action_deferred_push = 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
|
|
|
{
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-06-08 00:03:50 +00:00
|
|
|
rarch_setting_t *setting = menu_setting_find(elem0);
|
2015-03-20 20:22:38 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
cbs->action_deferred_push = deferred_push_default;
|
|
|
|
|
2015-06-08 00:03:50 +00:00
|
|
|
if (setting)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-06-17 17:55:24 +00:00
|
|
|
uint32_t parent_group_hash = menu_hash_calculate(setting->parent_group);
|
2015-06-14 14:13:24 +00:00
|
|
|
|
|
|
|
if ((parent_group_hash == MENU_VALUE_MAIN_MENU) && setting->type == ST_GROUP)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
2015-03-20 20:22:38 +00:00
|
|
|
if (!settings->menu.collapse_subgroups_enable)
|
2015-02-26 16:33:00 +00:00
|
|
|
{
|
|
|
|
cbs->action_deferred_push = deferred_push_settings_subgroup;
|
2015-06-07 16:36:10 +00:00
|
|
|
return 0;
|
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
|
|
|
}
|