2015-05-11 09:11:23 +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/>.
|
|
|
|
*/
|
|
|
|
|
2015-05-12 10:40:49 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#include <file/file_list.h>
|
|
|
|
#include <file/file_path.h>
|
|
|
|
#include <file/file_extract.h>
|
|
|
|
#include <file/dir_list.h>
|
2015-10-03 00:50:19 +00:00
|
|
|
#include <retro_stat.h>
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-05-11 09:11:23 +00:00
|
|
|
#include "menu.h"
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "menu_hash.h"
|
2015-05-12 11:14:04 +00:00
|
|
|
|
2015-06-13 17:15:48 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
|
|
|
#include "../database_info.h"
|
|
|
|
#endif
|
|
|
|
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "../general.h"
|
2015-05-12 23:18:45 +00:00
|
|
|
#include "../gfx/video_shader_driver.h"
|
2015-05-13 11:31:34 +00:00
|
|
|
#include "../config.features.h"
|
|
|
|
#include "../git_version.h"
|
2015-09-06 17:49:51 +00:00
|
|
|
#include "../file_ext.h"
|
2015-10-25 09:41:53 +00:00
|
|
|
#include "../input/input_common.h"
|
2015-10-26 05:55:42 +00:00
|
|
|
#include "../dir_list_special.h"
|
2015-10-26 20:03:28 +00:00
|
|
|
#include "../string_list_special.h"
|
2015-11-08 15:19:54 +00:00
|
|
|
#include "../cheevos.h"
|
2015-05-12 09:39:20 +00:00
|
|
|
|
2015-09-16 03:45:50 +00:00
|
|
|
#ifdef __linux__
|
|
|
|
#include "../frontend/drivers/platform_linux.h"
|
2015-07-13 00:55:44 +00:00
|
|
|
#endif
|
|
|
|
|
2015-08-19 22:49:44 +00:00
|
|
|
extern unsigned rpl_entry_selection_ptr;
|
|
|
|
|
2015-05-12 13:56:49 +00:00
|
|
|
#ifdef HAVE_NETWORKING
|
|
|
|
extern char *core_buf;
|
|
|
|
extern size_t core_len;
|
|
|
|
|
|
|
|
static void print_buf_lines(file_list_t *list, char *buf, int buf_size,
|
|
|
|
unsigned type)
|
|
|
|
{
|
2015-06-12 14:36:15 +00:00
|
|
|
char c;
|
2015-09-26 18:18:08 +00:00
|
|
|
int i, j = 0;
|
2015-06-12 14:36:15 +00:00
|
|
|
char *line_start = buf;
|
2015-05-12 13:56:49 +00:00
|
|
|
|
|
|
|
for (i = 0; i < buf_size; i++)
|
|
|
|
{
|
|
|
|
size_t ln;
|
|
|
|
|
|
|
|
/* The end of the buffer, print the last bit */
|
|
|
|
if (*(buf + i) == '\0')
|
|
|
|
break;
|
|
|
|
|
|
|
|
if (*(buf + i) != '\n')
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Found a line ending, print the line and compute new line_start */
|
|
|
|
|
|
|
|
/* Save the next char */
|
|
|
|
c = *(buf + i + 1);
|
|
|
|
/* replace with \0 */
|
|
|
|
*(buf + i + 1) = '\0';
|
|
|
|
|
|
|
|
/* We need to strip the newline. */
|
|
|
|
ln = strlen(line_start) - 1;
|
|
|
|
if (line_start[ln] == '\n')
|
|
|
|
line_start[ln] = '\0';
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(list, line_start, "",
|
2015-06-10 20:43:06 +00:00
|
|
|
type, 0, 0);
|
2015-07-04 16:57:04 +00:00
|
|
|
if (type == MENU_FILE_DOWNLOAD_CORE)
|
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-07-04 19:47:26 +00:00
|
|
|
if (settings)
|
|
|
|
{
|
2015-09-28 21:00:22 +00:00
|
|
|
char core_path[PATH_MAX_LENGTH];
|
2015-11-02 16:38:44 +00:00
|
|
|
char display_name[PATH_MAX_LENGTH];
|
2015-07-04 21:58:29 +00:00
|
|
|
char *last = NULL;
|
2015-09-28 21:00:22 +00:00
|
|
|
|
2015-07-04 19:47:26 +00:00
|
|
|
fill_pathname_join(core_path, settings->libretro_info_path,
|
|
|
|
line_start, sizeof(core_path));
|
2015-07-21 02:01:11 +00:00
|
|
|
|
2015-07-04 19:47:26 +00:00
|
|
|
path_remove_extension(core_path);
|
|
|
|
path_remove_extension(core_path);
|
2015-07-04 21:58:29 +00:00
|
|
|
last = (char*)strrchr(core_path, '_');
|
|
|
|
if (*last)
|
2015-11-02 16:38:44 +00:00
|
|
|
{
|
|
|
|
if (strcmp(last, "_libretro"))
|
|
|
|
*last = '\0';
|
|
|
|
}
|
2015-07-04 19:47:26 +00:00
|
|
|
strlcat(core_path, ".info", sizeof(core_path));
|
2015-07-04 16:57:04 +00:00
|
|
|
|
2015-07-04 19:47:26 +00:00
|
|
|
if (core_info_get_display_name(
|
|
|
|
core_path, display_name, sizeof(display_name)))
|
2015-10-19 15:12:03 +00:00
|
|
|
menu_entries_set_alt_at_offset(list, j, display_name);
|
2015-07-04 19:47:26 +00:00
|
|
|
}
|
2015-07-04 16:57:04 +00:00
|
|
|
}
|
|
|
|
j++;
|
2015-05-12 13:56:49 +00:00
|
|
|
|
|
|
|
/* Restore the saved char */
|
|
|
|
*(buf + i + 1) = c;
|
2015-09-26 18:18:08 +00:00
|
|
|
line_start = buf + i + 1;
|
2015-05-12 13:56:49 +00:00
|
|
|
}
|
|
|
|
/* If the buffer was completely full, and didn't end with a newline, just
|
|
|
|
* ignore the partial last line.
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-05-12 09:39:20 +00:00
|
|
|
static void menu_displaylist_push_perfcounter(
|
|
|
|
menu_displaylist_info_t *info,
|
2015-10-11 16:21:07 +00:00
|
|
|
struct retro_perf_counter **counters,
|
2015-05-12 09:39:20 +00:00
|
|
|
unsigned num, unsigned id)
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
if (!counters || num == 0)
|
2015-06-21 20:25:44 +00:00
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-21 20:25:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_PERFORMANCE_COUNTERS),
|
|
|
|
"", 0, 0, 0);
|
2015-05-12 09:39:20 +00:00
|
|
|
return;
|
2015-06-21 20:25:44 +00:00
|
|
|
}
|
2015-05-12 09:39:20 +00:00
|
|
|
|
|
|
|
for (i = 0; i < num; i++)
|
|
|
|
if (counters[i] && counters[i]->ident)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-10 20:43:06 +00:00
|
|
|
counters[i]->ident, "", id + i, 0, 0);
|
2015-05-12 09:39:20 +00:00
|
|
|
}
|
|
|
|
|
2015-05-18 22:40:12 +00:00
|
|
|
static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
unsigned i;
|
2015-09-26 00:39:28 +00:00
|
|
|
char tmp[PATH_MAX_LENGTH];
|
2015-06-14 02:43:30 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
2015-07-27 15:18:10 +00:00
|
|
|
core_info_t *core_info = global ? (core_info_t*)global->core_info.current : NULL;
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (!core_info || !core_info->data)
|
2015-05-18 22:40:12 +00:00
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 06:39:34 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE),
|
|
|
|
"", 0, 0, 0);
|
2015-06-14 02:43:30 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_CORE_NAME), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
if (core_info->core_name)
|
|
|
|
strlcat(tmp, core_info->core_name, sizeof(tmp));
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_CORE_LABEL), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
if (core_info->display_name)
|
|
|
|
strlcat(tmp, core_info->display_name, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->systemname)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_SYSTEM_NAME), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, core_info->systemname, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-06-14 02:43:30 +00:00
|
|
|
}
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->system_manufacturer)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_SYSTEM_MANUFACTURER), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, core_info->system_manufacturer, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-06-14 02:43:30 +00:00
|
|
|
}
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->categories_list)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_CATEGORIES), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-06-14 02:43:30 +00:00
|
|
|
string_list_join_concat(tmp, sizeof(tmp),
|
|
|
|
core_info->categories_list, ", ");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->authors_list)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_AUTHORS), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-06-14 02:43:30 +00:00
|
|
|
string_list_join_concat(tmp, sizeof(tmp),
|
|
|
|
core_info->authors_list, ", ");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->permissions_list)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_PERMISSIONS), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-06-14 02:43:30 +00:00
|
|
|
string_list_join_concat(tmp, sizeof(tmp),
|
|
|
|
core_info->permissions_list, ", ");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->licenses_list)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_LICENSES), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-06-14 02:43:30 +00:00
|
|
|
string_list_join_concat(tmp, sizeof(tmp),
|
|
|
|
core_info->licenses_list, ", ");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->supported_extensions_list)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_SUPPORTED_EXTENSIONS), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-06-14 02:43:30 +00:00
|
|
|
string_list_join_concat(tmp, sizeof(tmp),
|
|
|
|
core_info->supported_extensions_list, ", ");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->firmware_count > 0)
|
|
|
|
{
|
|
|
|
core_info_list_update_missing_firmware(
|
2015-07-27 15:18:10 +00:00
|
|
|
global->core_info.list, core_info->path,
|
2015-06-14 02:43:30 +00:00
|
|
|
settings->system_directory);
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_FIRMWARE), sizeof(tmp));
|
2015-06-19 16:02:55 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-06-25 14:53:58 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
/* FIXME: This looks hacky and probably needs to be improved for good translation support. */
|
2015-06-14 02:43:30 +00:00
|
|
|
for (i = 0; i < core_info->firmware_count; i++)
|
2015-05-18 22:40:12 +00:00
|
|
|
{
|
2015-06-14 02:43:30 +00:00
|
|
|
if (core_info->firmware[i].desc)
|
2015-05-18 22:40:12 +00:00
|
|
|
{
|
2015-06-25 14:53:58 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), " %s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_NAME),
|
2015-06-14 02:43:30 +00:00
|
|
|
core_info->firmware[i].desc ?
|
|
|
|
core_info->firmware[i].desc : "");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
2015-06-25 14:50:34 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), " %s: %s, %s",
|
|
|
|
menu_hash_to_str(MENU_VALUE_STATUS),
|
2015-06-14 02:43:30 +00:00
|
|
|
core_info->firmware[i].missing ?
|
2015-06-25 14:50:34 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_MISSING) :
|
|
|
|
menu_hash_to_str(MENU_VALUE_PRESENT),
|
2015-06-14 02:43:30 +00:00
|
|
|
core_info->firmware[i].optional ?
|
2015-06-25 14:50:34 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OPTIONAL) :
|
|
|
|
menu_hash_to_str(MENU_VALUE_REQUIRED)
|
|
|
|
);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:40:12 +00:00
|
|
|
}
|
|
|
|
}
|
2015-06-14 02:43:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (core_info->notes)
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFO_CORE_NOTES), sizeof(tmp));
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 02:43:30 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 02:43:30 +00:00
|
|
|
for (i = 0; i < core_info->note_list->size; i++)
|
2015-05-18 22:40:12 +00:00
|
|
|
{
|
2015-06-19 15:12:10 +00:00
|
|
|
strlcpy(tmp,
|
|
|
|
core_info->note_list->elems[i].data, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:40:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-09-24 01:48:08 +00:00
|
|
|
static int menu_displaylist_parse_debug_info(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-09-26 00:39:28 +00:00
|
|
|
char tmp[PATH_MAX_LENGTH];
|
2015-09-24 12:16:51 +00:00
|
|
|
|
2015-09-24 01:48:08 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
2015-10-03 00:45:40 +00:00
|
|
|
bool ret;
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, "Directory Tests:", "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-03 00:45:40 +00:00
|
|
|
|
2015-10-04 00:29:51 +00:00
|
|
|
/* Assume libretro directory exists and check if stat works */
|
2015-10-03 00:45:40 +00:00
|
|
|
ret = path_is_directory(settings->libretro_directory);
|
2015-11-02 03:09:46 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "- stat directory... %s", ret ? "passed" : "failed");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-03 00:45:40 +00:00
|
|
|
|
2015-10-04 00:29:51 +00:00
|
|
|
/* Try to create a "test" subdirectory on top of libretro directory */
|
2015-11-02 03:09:46 +00:00
|
|
|
fill_pathname_join(tmp, settings->libretro_directory, ".retroarch", PATH_MAX_LENGTH);
|
2015-10-03 00:45:40 +00:00
|
|
|
ret = path_mkdir(tmp);
|
2015-11-02 03:09:46 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "- create a directory... %s", ret ? "passed" : "failed");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, "", "",
|
2015-10-03 00:45:40 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-04 00:29:51 +00:00
|
|
|
|
|
|
|
/* Check if save directory exists */
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, "Savefile Directory", "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-03 00:45:40 +00:00
|
|
|
ret = path_is_directory(global->dir.savefile);
|
2015-11-02 03:09:46 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "- directory name: %s", global->dir.savefile);
|
|
|
|
menu_entries_push(info->list, tmp, "",
|
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
snprintf(tmp, sizeof(tmp), "- directory exists: %s", ret ? "true" : "false");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-04 00:29:51 +00:00
|
|
|
|
|
|
|
/* Check if save directory is writable */
|
2015-11-02 03:09:46 +00:00
|
|
|
fill_pathname_join(tmp, global->dir.savefile, ".retroarch", PATH_MAX_LENGTH);
|
2015-10-03 00:45:40 +00:00
|
|
|
ret = path_mkdir(tmp);
|
2015-11-02 03:09:46 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "- directory writable: %s", ret ? "true" : "false");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
2015-11-02 03:09:46 +00:00
|
|
|
menu_entries_push(info->list, "", "",
|
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
2015-10-04 00:29:51 +00:00
|
|
|
/* Check if state directory exists */
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, "Savestate Directory", "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-03 00:45:40 +00:00
|
|
|
ret = path_is_directory(global->dir.savestate);
|
2015-11-02 03:09:46 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "- directory name: %s", global->dir.savestate);
|
|
|
|
menu_entries_push(info->list, tmp, "",
|
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
snprintf(tmp, sizeof(tmp), "- directory exists: %s", ret ? "true" : "false");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-04 00:29:51 +00:00
|
|
|
|
|
|
|
/* Check if save directory is writable */
|
2015-11-02 03:09:46 +00:00
|
|
|
fill_pathname_join(tmp, global->dir.savestate, ".retroarch", PATH_MAX_LENGTH);
|
2015-10-03 00:45:40 +00:00
|
|
|
ret = path_mkdir(tmp);
|
2015-11-02 03:09:46 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "- directory writable: %s", ret ? "true" : "false");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-11-02 03:09:46 +00:00
|
|
|
|
|
|
|
menu_entries_push(info->list, "", "",
|
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
|
|
|
/* Check if system directory exists */
|
|
|
|
menu_entries_push(info->list, "System Directory", "",
|
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
ret = path_is_directory(settings->system_directory);
|
|
|
|
snprintf(tmp, sizeof(tmp), "- directory name: %s", settings->system_directory);
|
|
|
|
menu_entries_push(info->list, tmp, "",
|
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
snprintf(tmp, sizeof(tmp), "- directory exists: %s", ret ? "true" : "false");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-10-04 00:29:51 +00:00
|
|
|
|
|
|
|
/* Check if save directory is writable */
|
2015-11-02 03:09:46 +00:00
|
|
|
fill_pathname_join(tmp, settings->system_directory, ".retroarch", PATH_MAX_LENGTH);
|
2015-10-03 00:45:40 +00:00
|
|
|
ret = path_mkdir(tmp);
|
2015-11-02 03:09:46 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "- directory writable: %s", ret ? "true" : "false");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-09-24 01:48:08 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-11-02 03:09:46 +00:00
|
|
|
|
2015-09-24 01:48:08 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 22:41:39 +00:00
|
|
|
static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
|
2015-05-12 10:40:49 +00:00
|
|
|
{
|
2015-09-06 21:43:27 +00:00
|
|
|
int controller;
|
2015-09-29 15:35:28 +00:00
|
|
|
char tmp[PATH_MAX_LENGTH], feat_str[PATH_MAX_LENGTH];
|
2015-06-14 05:24:38 +00:00
|
|
|
const char *tmp_string = NULL;
|
|
|
|
const frontend_ctx_driver_t *frontend = frontend_get_ptr();
|
2015-09-26 00:39:28 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s: %s", menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_BUILD_DATE), __DATE__);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:40:12 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
(void)tmp_string;
|
2015-05-18 22:34:29 +00:00
|
|
|
|
2015-05-18 22:41:39 +00:00
|
|
|
#ifdef HAVE_GIT_VERSION
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_GIT_VERSION), sizeof(tmp));
|
2015-06-19 15:46:39 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, rarch_git_version, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:41:39 +00:00
|
|
|
#endif
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
rarch_info_get_capabilities(RARCH_CAPABILITIES_COMPILER, tmp, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "", MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-07-13 00:55:44 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
bool perms = test_permissions(sdcard_dir);
|
|
|
|
|
|
|
|
snprintf(tmp, sizeof(tmp), "%s: %s", "Internal SD card status", perms ? "read-write" : "read-only");
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-07-13 00:55:44 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
|
|
|
#endif
|
2015-06-14 05:24:38 +00:00
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
char cpu_str[PATH_MAX_LENGTH];
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(cpu_str, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_CPU_FEATURES), sizeof(cpu_str));
|
2015-06-19 15:46:39 +00:00
|
|
|
strlcat(cpu_str, ": ", sizeof(cpu_str));
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
rarch_info_get_capabilities(RARCH_CAPABILITIES_CPU, cpu_str, sizeof(cpu_str));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, cpu_str, "", MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-06-14 05:24:38 +00:00
|
|
|
}
|
|
|
|
|
2015-09-06 21:43:27 +00:00
|
|
|
for(controller = 0; controller < MAX_USERS; controller++)
|
2015-07-26 20:40:29 +00:00
|
|
|
{
|
|
|
|
if (settings->input.autoconfigured[controller])
|
|
|
|
{
|
|
|
|
snprintf(tmp, sizeof(tmp), "Port #%d device name: %s", controller, settings->input.device_names[controller]);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "", MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-07-26 20:40:29 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "Port #%d device VID/PID: %d/%d", controller, settings->input.vid[controller], settings->input.pid[controller]);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "", MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-07-26 20:40:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
if (frontend)
|
|
|
|
{
|
2015-09-29 15:35:28 +00:00
|
|
|
char tmp2[PATH_MAX_LENGTH];
|
2015-06-14 05:24:38 +00:00
|
|
|
int major = 0, minor = 0;
|
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_FRONTEND_IDENTIFIER), sizeof(tmp));
|
2015-06-19 15:46:39 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, frontend->ident, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
if (frontend->get_name)
|
2015-05-18 22:41:39 +00:00
|
|
|
{
|
2015-06-14 05:24:38 +00:00
|
|
|
frontend->get_name(tmp2, sizeof(tmp2));
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_FRONTEND_NAME), sizeof(tmp));
|
2015-06-19 15:46:39 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcat(tmp, frontend->get_name ? tmp2 : menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE), sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
if (frontend->get_os)
|
|
|
|
{
|
|
|
|
frontend->get_os(tmp2, sizeof(tmp2), &major, &minor);
|
2015-06-19 16:02:55 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s : %s %d.%d",
|
2015-06-24 17:37:55 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_FRONTEND_OS),
|
|
|
|
frontend->get_os ? tmp2 : menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE), major, minor);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-06-14 05:24:38 +00:00
|
|
|
}
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-19 16:02:55 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s : %d",
|
2015-06-24 17:37:55 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_RETRORATING_LEVEL),
|
2015-06-14 05:24:38 +00:00
|
|
|
frontend->get_rating ? frontend->get_rating() : -1);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
|
|
|
|
if (frontend->get_powerstate)
|
|
|
|
{
|
|
|
|
int seconds = 0, percent = 0;
|
|
|
|
enum frontend_powerstate state = frontend->get_powerstate(&seconds, &percent);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
tmp2[0] = '\0';
|
|
|
|
|
|
|
|
if (percent != 0)
|
|
|
|
snprintf(tmp2, sizeof(tmp2), "%d%%", percent);
|
|
|
|
|
|
|
|
switch (state)
|
2015-05-18 22:34:29 +00:00
|
|
|
{
|
2015-06-14 05:24:38 +00:00
|
|
|
case FRONTEND_POWERSTATE_NONE:
|
2015-06-24 18:05:40 +00:00
|
|
|
strlcat(tmp2, " ", sizeof(tmp));
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcat(tmp2, menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE), sizeof(tmp));
|
2015-06-14 05:24:38 +00:00
|
|
|
break;
|
|
|
|
case FRONTEND_POWERSTATE_NO_SOURCE:
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcat(tmp2, " (", sizeof(tmp));
|
|
|
|
strlcat(tmp2, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE), sizeof(tmp));
|
|
|
|
strlcat(tmp2, ")", sizeof(tmp));
|
2015-06-14 05:24:38 +00:00
|
|
|
break;
|
|
|
|
case FRONTEND_POWERSTATE_CHARGING:
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcat(tmp2, " (", sizeof(tmp));
|
|
|
|
strlcat(tmp2, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_CHARGING), sizeof(tmp));
|
|
|
|
strlcat(tmp2, ")", sizeof(tmp));
|
2015-06-14 05:24:38 +00:00
|
|
|
break;
|
|
|
|
case FRONTEND_POWERSTATE_CHARGED:
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcat(tmp2, " (", sizeof(tmp));
|
|
|
|
strlcat(tmp2, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_CHARGED), sizeof(tmp));
|
|
|
|
strlcat(tmp2, ")", sizeof(tmp));
|
2015-06-14 05:24:38 +00:00
|
|
|
break;
|
|
|
|
case FRONTEND_POWERSTATE_ON_POWER_SOURCE:
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcat(tmp2, " (", sizeof(tmp));
|
|
|
|
strlcat(tmp2, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING), sizeof(tmp));
|
|
|
|
strlcat(tmp2, ")", sizeof(tmp));
|
2015-06-14 05:24:38 +00:00
|
|
|
break;
|
2015-05-18 22:34:29 +00:00
|
|
|
}
|
2015-05-14 23:24:51 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE), sizeof(tmp));
|
2015-06-19 15:46:39 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, tmp2, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:41:39 +00:00
|
|
|
}
|
2015-06-14 05:24:38 +00:00
|
|
|
}
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-05-18 22:41:39 +00:00
|
|
|
#if defined(HAVE_OPENGL) || defined(HAVE_GLES)
|
2015-06-14 05:24:38 +00:00
|
|
|
tmp_string = gfx_ctx_get_ident();
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(tmp, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_VIDEO_CONTEXT_DRIVER), sizeof(tmp));
|
2015-06-19 15:46:39 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcat(tmp, tmp_string ? tmp_string : menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE), sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
{
|
|
|
|
float val = 0.0f;
|
|
|
|
if (gfx_ctx_get_metrics(DISPLAY_METRIC_MM_WIDTH, &val))
|
2015-05-18 22:41:39 +00:00
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s: %.2f",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_WIDTH), val);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
if (gfx_ctx_get_metrics(DISPLAY_METRIC_MM_HEIGHT, &val))
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s: %.2f",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_WIDTH), val);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:41:39 +00:00
|
|
|
}
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
if (gfx_ctx_get_metrics(DISPLAY_METRIC_DPI, &val))
|
|
|
|
{
|
2015-06-24 17:37:55 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s: %.2f",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_DPI), val);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
|
|
|
}
|
2015-05-18 22:41:39 +00:00
|
|
|
}
|
2015-06-14 05:24:38 +00:00
|
|
|
#endif
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(feat_str, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_LIBRETRODB_SUPPORT), sizeof(feat_str));
|
2015-06-19 15:49:13 +00:00
|
|
|
strlcat(feat_str, ": ", sizeof(feat_str));
|
2015-06-24 18:15:13 +00:00
|
|
|
strlcat(feat_str, _libretrodb_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO), sizeof(feat_str));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(feat_str, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_OVERLAY_SUPPORT), sizeof(feat_str));
|
2015-06-19 15:49:13 +00:00
|
|
|
strlcat(feat_str, ": ", sizeof(feat_str));
|
2015-06-24 18:15:13 +00:00
|
|
|
strlcat(feat_str, _overlay_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO), sizeof(feat_str));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-24 17:37:55 +00:00
|
|
|
strlcpy(feat_str, menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_COMMAND_IFACE_SUPPORT), sizeof(feat_str));
|
2015-06-21 06:01:26 +00:00
|
|
|
strlcat(feat_str, ": ", sizeof(feat_str));
|
2015-06-24 18:15:13 +00:00
|
|
|
strlcat(feat_str, _command_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO), sizeof(feat_str));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-19 16:02:55 +00:00
|
|
|
"%s : %s",
|
2015-06-24 17:37:55 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_NETWORK_COMMAND_IFACE_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_network_command_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_cocoa_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-18 22:34:29 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_RPNG_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_rpng_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_SDL_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_sdl_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:40:49 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_SDL2_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_sdl2_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:55:48 +00:00
|
|
|
|
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_OPENGL_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_opengl_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:55:48 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_OPENGLES_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_opengles_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:55:48 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_THREADING_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_thread_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:55:48 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_KMS_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_kms_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:55:48 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_UDEV_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_udev_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:55:48 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_OPENVG_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_vg_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_EGL_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_egl_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_X11_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_x11_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_WAYLAND_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_wayland_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_XVIDEO_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_xvideo_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_ALSA_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_alsa_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_OSS_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_oss_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_OPENAL_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_al_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_OPENSL_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_sl_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_RSOUND_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_rsound_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_ROARAUDIO_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_roar_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_JACK_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_jack_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_PULSEAUDIO_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_pulse_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_DSOUND_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_dsound_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_XAUDIO2_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_xaudio_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_ZLIB_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_zlib_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_7ZIP_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_7zip_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_DYLIB_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_dylib_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_CG_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_cg_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_GLSL_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_glsl_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_HLSL_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_hlsl_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_LIBXML2_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_libxml2_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_SDL_IMAGE_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_sdl_image_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 10:58:23 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_FBO_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_fbo_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 13:41:38 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_FFMPEG_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_ffmpeg_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-14 23:12:06 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_CORETEXT_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_coretext_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 13:41:38 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_FREETYPE_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_freetype_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 13:41:38 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_NETPLAY_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_netplay_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 13:41:38 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_PYTHON_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_python_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 13:41:38 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_V4L2_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_v4l2_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 13:41:38 +00:00
|
|
|
|
2015-06-14 05:24:38 +00:00
|
|
|
snprintf(feat_str, sizeof(feat_str),
|
2015-06-24 17:37:55 +00:00
|
|
|
"%s: %s",
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFO_LIBUSB_SUPPORT),
|
2015-06-24 18:15:13 +00:00
|
|
|
_libusb_supp ? menu_hash_to_str(MENU_LABEL_VALUE_YES) : menu_hash_to_str(MENU_LABEL_VALUE_NO));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, feat_str, "",
|
2015-06-14 05:24:38 +00:00
|
|
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
2015-05-12 13:41:38 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-22 16:54:52 +00:00
|
|
|
static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
2015-06-09 00:49:06 +00:00
|
|
|
content_playlist_t *playlist, const char *path_playlist, bool is_history)
|
2015-05-18 22:44:57 +00:00
|
|
|
{
|
|
|
|
unsigned i;
|
2015-05-22 00:34:05 +00:00
|
|
|
size_t list_size = 0;
|
|
|
|
|
|
|
|
if (!playlist)
|
|
|
|
return -1;
|
2015-06-06 20:51:28 +00:00
|
|
|
|
2015-05-22 00:34:05 +00:00
|
|
|
list_size = content_playlist_size(playlist);
|
2015-05-18 22:44:57 +00:00
|
|
|
|
2015-09-28 16:44:28 +00:00
|
|
|
if (list_size == 0)
|
2015-05-18 22:44:57 +00:00
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-04 15:20:49 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
2015-10-22 20:43:25 +00:00
|
|
|
MENU_INFO_MESSAGE, 0, 0);
|
2015-05-18 22:44:57 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < list_size; i++)
|
|
|
|
{
|
2015-06-14 14:26:50 +00:00
|
|
|
uint32_t core_name_hash;
|
2015-09-26 00:39:28 +00:00
|
|
|
char fill_buf[PATH_MAX_LENGTH], path_copy[PATH_MAX_LENGTH];
|
2015-06-18 18:56:58 +00:00
|
|
|
bool core_detected = false;
|
2015-06-12 14:36:15 +00:00
|
|
|
const char *core_name = NULL;
|
|
|
|
const char *db_name = NULL;
|
|
|
|
const char *path = NULL;
|
|
|
|
const char *label = NULL;
|
|
|
|
const char *crc32 = NULL;
|
2015-05-21 02:11:20 +00:00
|
|
|
|
2015-07-24 00:24:33 +00:00
|
|
|
(void)core_detected;
|
|
|
|
|
2015-05-18 22:44:57 +00:00
|
|
|
strlcpy(path_copy, info->path, sizeof(path_copy));
|
|
|
|
|
|
|
|
path = path_copy;
|
|
|
|
|
2015-05-21 22:28:02 +00:00
|
|
|
content_playlist_get_index(playlist, i,
|
2015-06-08 21:38:03 +00:00
|
|
|
&path, &label, NULL, &core_name, &crc32, &db_name);
|
2015-05-18 22:44:57 +00:00
|
|
|
strlcpy(fill_buf, core_name, sizeof(fill_buf));
|
|
|
|
|
2015-06-17 17:55:24 +00:00
|
|
|
core_name_hash = core_name ? menu_hash_calculate(core_name) : 0;
|
2015-06-14 14:26:50 +00:00
|
|
|
|
2015-05-18 22:44:57 +00:00
|
|
|
if (path)
|
|
|
|
{
|
2015-06-12 14:36:15 +00:00
|
|
|
char path_short[PATH_MAX_LENGTH] = {0};
|
2015-05-18 22:44:57 +00:00
|
|
|
|
|
|
|
fill_short_pathname_representation(path_short, path,
|
|
|
|
sizeof(path_short));
|
2015-07-21 02:01:11 +00:00
|
|
|
strlcpy(fill_buf,
|
2015-06-19 16:02:55 +00:00
|
|
|
(label && label[0] != '\0') ? label : path_short,
|
|
|
|
sizeof(fill_buf));
|
2015-05-25 22:31:03 +00:00
|
|
|
|
|
|
|
if (core_name && core_name[0] != '\0')
|
|
|
|
{
|
2015-06-14 14:26:50 +00:00
|
|
|
if (core_name_hash != MENU_VALUE_DETECT)
|
2015-05-26 02:38:56 +00:00
|
|
|
{
|
2015-06-12 14:36:15 +00:00
|
|
|
char tmp[PATH_MAX_LENGTH] = {0};
|
2015-05-26 02:38:56 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), " (%s)", core_name);
|
|
|
|
strlcat(fill_buf, tmp, sizeof(fill_buf));
|
2015-06-18 18:56:58 +00:00
|
|
|
core_detected = true;
|
2015-05-26 02:38:56 +00:00
|
|
|
}
|
2015-05-25 22:31:03 +00:00
|
|
|
}
|
2015-05-18 22:44:57 +00:00
|
|
|
}
|
|
|
|
|
2015-07-23 17:44:59 +00:00
|
|
|
if (is_history)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, fill_buf, path_playlist,
|
2015-06-10 21:11:40 +00:00
|
|
|
MENU_FILE_PLAYLIST_ENTRY, 0, i);
|
2015-07-23 17:44:59 +00:00
|
|
|
else
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, label,
|
2015-07-23 17:44:59 +00:00
|
|
|
path, MENU_FILE_RPL_ENTRY, 0, i);
|
2015-05-18 22:44:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info)
|
2015-05-12 14:01:54 +00:00
|
|
|
{
|
2015-05-19 04:32:49 +00:00
|
|
|
unsigned i;
|
|
|
|
struct video_shader *shader = NULL;
|
2015-06-12 14:36:15 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-05-12 14:01:54 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
shader = menu->shader;
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!shader)
|
|
|
|
return -1;
|
2015-05-18 22:49:27 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:29:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SHADER_APPLY_CHANGES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SHADER_APPLY_CHANGES),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:29:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHADER_PRESET),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_PRESET),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_FILE_PATH, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:29:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_AS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS),
|
2015-06-19 08:25:19 +00:00
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-21 06:17:00 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHADER_PARAMETERS),
|
2015-06-19 20:29:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_PARAMETERS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-21 06:17:00 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHADER_PRESET_PARAMETERS),
|
2015-06-19 20:29:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:29:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES),
|
2015-06-19 08:25:19 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_NUM_PASSES),
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-18 22:49:27 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
for (i = 0; i < shader->passes; i++)
|
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
char buf_tmp[64], buf[64];
|
2015-05-18 22:49:27 +00:00
|
|
|
|
2015-06-24 05:15:20 +00:00
|
|
|
snprintf(buf_tmp, sizeof(buf_tmp), "%s #%u", menu_hash_to_str(MENU_VALUE_SHADER), i);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, buf_tmp,
|
2015-06-19 08:25:19 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_PASS),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_SHADER_PASS_0 + i, 0, 0);
|
2015-05-18 22:49:27 +00:00
|
|
|
|
2015-06-24 05:15:20 +00:00
|
|
|
snprintf(buf, sizeof(buf), "%s Filter", buf_tmp);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, buf,
|
2015-06-19 08:25:19 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_FILTER_PASS),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_SHADER_PASS_FILTER_0 + i, 0, 0);
|
2015-05-18 22:49:27 +00:00
|
|
|
|
2015-06-24 05:15:20 +00:00
|
|
|
snprintf(buf, sizeof(buf), "%s Scale", buf_tmp);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, buf,
|
2015-06-19 08:25:19 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_SCALE_PASS),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_SHADER_PASS_SCALE_0 + i, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-05-18 22:49:27 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-05-18 22:49:27 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
|
|
|
static int create_string_list_rdb_entry_string(const char *desc, const char *label,
|
|
|
|
const char *actual_string, const char *path, file_list_t *list)
|
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
char tmp[PATH_MAX_LENGTH];
|
2015-06-23 04:13:57 +00:00
|
|
|
union string_list_elem_attr attr = {0};
|
2015-06-12 14:36:15 +00:00
|
|
|
char *output_label = NULL;
|
|
|
|
int str_len = 0;
|
2015-05-19 04:32:49 +00:00
|
|
|
struct string_list *str_list = string_list_new();
|
2015-05-18 22:44:57 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!str_list)
|
|
|
|
return -1;
|
2015-05-12 14:01:54 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
str_len += strlen(label) + 1;
|
|
|
|
string_list_append(str_list, label, attr);
|
2015-05-14 23:57:32 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
str_len += strlen(actual_string) + 1;
|
|
|
|
string_list_append(str_list, actual_string, attr);
|
2015-05-12 23:18:45 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
str_len += strlen(path) + 1;
|
|
|
|
string_list_append(str_list, path, attr);
|
2015-05-12 23:18:45 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
output_label = (char*)calloc(str_len, sizeof(char));
|
2015-05-12 23:18:45 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!output_label)
|
|
|
|
{
|
|
|
|
string_list_free(str_list);
|
|
|
|
return -1;
|
|
|
|
}
|
2015-05-12 23:31:58 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
string_list_join_concat(output_label, str_len, str_list, "|");
|
2015-05-12 23:53:32 +00:00
|
|
|
|
2015-06-19 16:02:55 +00:00
|
|
|
strlcpy(tmp, desc, sizeof(tmp));
|
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, actual_string, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(list, tmp, output_label, 0, 0, 0);
|
2015-05-12 23:53:32 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (output_label)
|
|
|
|
free(output_label);
|
|
|
|
string_list_free(str_list);
|
|
|
|
str_list = NULL;
|
2015-05-12 23:53:32 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-05-12 23:53:32 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
static int create_string_list_rdb_entry_int(const char *desc, const char *label,
|
|
|
|
int actual_int, const char *path, file_list_t *list)
|
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
char tmp[PATH_MAX_LENGTH];
|
2015-06-23 04:13:57 +00:00
|
|
|
union string_list_elem_attr attr = {0};
|
2015-09-26 00:47:17 +00:00
|
|
|
char str[PATH_MAX_LENGTH] = {0};
|
|
|
|
char *output_label = NULL;
|
|
|
|
int str_len = 0;
|
|
|
|
struct string_list *str_list = string_list_new();
|
2015-05-12 23:53:32 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!str_list)
|
|
|
|
return -1;
|
2015-05-13 10:52:29 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
str_len += strlen(label) + 1;
|
|
|
|
string_list_append(str_list, label, attr);
|
2015-05-13 10:52:29 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
snprintf(str, sizeof(str), "%d", actual_int);
|
|
|
|
str_len += strlen(str) + 1;
|
|
|
|
string_list_append(str_list, str, attr);
|
2015-05-13 10:52:29 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
str_len += strlen(path) + 1;
|
|
|
|
string_list_append(str_list, path, attr);
|
2015-05-13 10:55:41 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
output_label = (char*)calloc(str_len, sizeof(char));
|
2015-05-13 10:55:41 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!output_label)
|
|
|
|
{
|
|
|
|
string_list_free(str_list);
|
2015-05-18 22:41:39 +00:00
|
|
|
return -1;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-05-13 10:55:41 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
string_list_join_concat(output_label, str_len, str_list, "|");
|
2015-05-13 10:55:41 +00:00
|
|
|
|
2015-06-19 16:04:29 +00:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s : %d", desc, actual_int);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(list, tmp, output_label,
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (output_label)
|
|
|
|
free(output_label);
|
|
|
|
string_list_free(str_list);
|
|
|
|
str_list = NULL;
|
2015-05-13 10:55:41 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
#endif
|
2015-05-13 10:55:41 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
|
2015-05-13 10:58:42 +00:00
|
|
|
{
|
2015-05-19 04:32:49 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-06-09 22:53:31 +00:00
|
|
|
unsigned i, j, k;
|
2015-09-26 00:39:28 +00:00
|
|
|
char path_playlist[PATH_MAX_LENGTH];
|
2015-06-12 14:36:15 +00:00
|
|
|
content_playlist_t *playlist = NULL;
|
|
|
|
database_info_list_t *db_info = NULL;
|
|
|
|
char path_base[PATH_MAX_LENGTH] = {0};
|
|
|
|
char query[PATH_MAX_LENGTH] = {0};
|
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!menu)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-24 17:36:28 +00:00
|
|
|
database_info_build_query(query, sizeof(query), "displaylist_parse_database_entry", info->path_b);
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!(db_info = database_info_list_new(info->path, query)))
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-13 10:58:42 +00:00
|
|
|
|
2015-06-22 17:39:56 +00:00
|
|
|
fill_short_pathname_representation(path_base, info->path,
|
|
|
|
sizeof(path_base));
|
2015-05-19 04:32:49 +00:00
|
|
|
path_remove_extension(path_base);
|
2015-06-08 21:38:03 +00:00
|
|
|
strlcat(path_base, ".lpl", sizeof(path_base));
|
2015-05-13 10:58:42 +00:00
|
|
|
|
2015-05-21 22:29:55 +00:00
|
|
|
fill_pathname_join(path_playlist, settings->playlist_directory, path_base,
|
|
|
|
sizeof(path_playlist));
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-07-25 22:40:24 +00:00
|
|
|
playlist = content_playlist_init(path_playlist, COLLECTION_SIZE);
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-25 23:58:52 +00:00
|
|
|
if (playlist)
|
|
|
|
strlcpy(menu->db_playlist_file, path_playlist,
|
|
|
|
sizeof(menu->db_playlist_file));
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
for (i = 0; i < db_info->count; i++)
|
2015-05-13 11:31:34 +00:00
|
|
|
{
|
2015-06-12 14:36:15 +00:00
|
|
|
char tmp[PATH_MAX_LENGTH] = {0};
|
|
|
|
char crc_str[20] = {0};
|
2015-05-19 04:32:49 +00:00
|
|
|
database_info_t *db_info_entry = &db_info->list[i];
|
2015-06-18 01:10:24 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
bool show_advanced_settings = settings ? settings->menu.show_advanced_settings : false;
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!db_info_entry)
|
2015-05-18 22:41:39 +00:00
|
|
|
continue;
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-06-09 23:13:03 +00:00
|
|
|
snprintf(crc_str, sizeof(crc_str), "%08X", db_info_entry->crc32);
|
|
|
|
|
2015-06-09 22:53:31 +00:00
|
|
|
if (playlist)
|
|
|
|
{
|
|
|
|
for (j = 0; j < playlist->size; j++)
|
|
|
|
{
|
2015-06-12 14:36:15 +00:00
|
|
|
char elem0[PATH_MAX_LENGTH] = {0};
|
|
|
|
char elem1[PATH_MAX_LENGTH] = {0};
|
|
|
|
bool match_found = false;
|
2015-06-09 22:53:31 +00:00
|
|
|
struct string_list *tmp_str_list = string_split(
|
|
|
|
playlist->entries[j].crc32, "|");
|
2015-06-12 14:36:15 +00:00
|
|
|
uint32_t hash_value = 0;
|
2015-06-09 22:53:31 +00:00
|
|
|
|
|
|
|
if (!tmp_str_list)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (tmp_str_list->size > 0)
|
|
|
|
strlcpy(elem0, tmp_str_list->elems[0].data, sizeof(elem0));
|
|
|
|
if (tmp_str_list->size > 1)
|
|
|
|
strlcpy(elem1, tmp_str_list->elems[1].data, sizeof(elem1));
|
|
|
|
|
2015-06-17 17:55:24 +00:00
|
|
|
hash_value = menu_hash_calculate(elem1);
|
2015-06-09 22:53:31 +00:00
|
|
|
|
|
|
|
switch (hash_value)
|
|
|
|
{
|
|
|
|
case MENU_VALUE_CRC:
|
2015-06-09 23:13:03 +00:00
|
|
|
if (!strcmp(crc_str, elem0))
|
2015-06-09 22:53:31 +00:00
|
|
|
match_found = true;
|
|
|
|
break;
|
|
|
|
case MENU_VALUE_SHA1:
|
|
|
|
if (!strcmp(db_info_entry->sha1, elem0))
|
|
|
|
match_found = true;
|
|
|
|
break;
|
|
|
|
case MENU_VALUE_MD5:
|
|
|
|
if (!strcmp(db_info_entry->md5, elem0))
|
|
|
|
match_found = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
string_list_free(tmp_str_list);
|
|
|
|
|
|
|
|
if (!match_found)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
rdb_entry_start_game_selection_ptr = j;
|
|
|
|
}
|
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info_entry->name)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
strlcpy(tmp,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_NAME),
|
|
|
|
sizeof(tmp));
|
2015-06-19 15:14:26 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, db_info_entry->name, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp,
|
2015-06-19 08:08:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_NAME),
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->description)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
strlcpy(tmp,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_DESCRIPTION),
|
|
|
|
sizeof(tmp));
|
2015-06-19 15:14:26 +00:00
|
|
|
strlcat(tmp, ": ", sizeof(tmp));
|
|
|
|
strlcat(tmp, db_info_entry->description, sizeof(tmp));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp,
|
2015-06-19 08:08:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_DESCRIPTION),
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->publisher)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
if (create_string_list_rdb_entry_string(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_PUBLISHER),
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_PUBLISHER),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->publisher, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-06-09 22:53:31 +00:00
|
|
|
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info_entry->developer)
|
|
|
|
{
|
2015-06-09 22:53:31 +00:00
|
|
|
for (k = 0; k < db_info_entry->developer->size; k++)
|
|
|
|
{
|
|
|
|
if (db_info_entry->developer->elems[k].data)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
if (create_string_list_rdb_entry_string(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_DEVELOPER),
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_DEVELOPER),
|
2015-06-09 22:53:31 +00:00
|
|
|
db_info_entry->developer->elems[k].data,
|
|
|
|
info->path, info->list) == -1)
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-06-09 22:53:31 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info_entry->origin)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
if (create_string_list_rdb_entry_string(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_ORIGIN),
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_ORIGIN),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->origin, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->franchise)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
if (create_string_list_rdb_entry_string(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_FRANCHISE),
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_FRANCHISE),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->franchise, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->max_users)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
if (create_string_list_rdb_entry_int(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_MAX_USERS),
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_MAX_USERS),
|
|
|
|
db_info_entry->max_users,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->famitsu_magazine_rating)
|
|
|
|
{
|
|
|
|
if (create_string_list_rdb_entry_int("Famitsu Magazine Rating",
|
2015-06-19 19:41:54 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_FAMITSU_MAGAZINE_RATING),
|
|
|
|
db_info_entry->famitsu_magazine_rating,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->edge_magazine_review)
|
|
|
|
{
|
2015-06-21 06:17:00 +00:00
|
|
|
if (create_string_list_rdb_entry_string("Edge Magazine Review",
|
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_REVIEW),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->edge_magazine_review, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->edge_magazine_rating)
|
|
|
|
{
|
|
|
|
if (create_string_list_rdb_entry_int("Edge Magazine Rating",
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_RATING),
|
|
|
|
db_info_entry->edge_magazine_rating,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->edge_magazine_issue)
|
|
|
|
{
|
|
|
|
if (create_string_list_rdb_entry_int("Edge Magazine Issue",
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_ISSUE),
|
|
|
|
db_info_entry->edge_magazine_issue,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->releasemonth)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
if (create_string_list_rdb_entry_int(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_RELEASE_MONTH),
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_RELEASE_MONTH),
|
|
|
|
db_info_entry->releasemonth,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info_entry->releaseyear)
|
|
|
|
{
|
2015-06-25 14:50:34 +00:00
|
|
|
if (create_string_list_rdb_entry_int(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_RELEASE_YEAR),
|
2015-06-19 08:00:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_RELEASE_YEAR),
|
|
|
|
db_info_entry->releaseyear,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->bbfc_rating)
|
|
|
|
{
|
2015-06-19 19:41:54 +00:00
|
|
|
if (create_string_list_rdb_entry_string("BBFC Rating",
|
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_BBFC_RATING),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->bbfc_rating, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->esrb_rating)
|
|
|
|
{
|
2015-06-19 19:41:54 +00:00
|
|
|
if (create_string_list_rdb_entry_string("ESRB Rating",
|
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_ESRB_RATING),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->esrb_rating, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->elspa_rating)
|
|
|
|
{
|
2015-06-19 19:41:54 +00:00
|
|
|
if (create_string_list_rdb_entry_string("ELSPA Rating",
|
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_ELSPA_RATING),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->elspa_rating, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->pegi_rating)
|
|
|
|
{
|
2015-06-19 19:41:54 +00:00
|
|
|
if (create_string_list_rdb_entry_string("PEGI Rating",
|
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_PEGI_RATING),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->pegi_rating, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->enhancement_hw)
|
|
|
|
{
|
2015-06-19 19:41:54 +00:00
|
|
|
if (create_string_list_rdb_entry_string("Enhancement Hardware",
|
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_ENHANCEMENT_HW),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->enhancement_hw, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
if (db_info_entry->cero_rating)
|
|
|
|
{
|
2015-06-19 19:41:54 +00:00
|
|
|
if (create_string_list_rdb_entry_string("CERO Rating",
|
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_CERO_RATING),
|
2015-06-06 20:51:28 +00:00
|
|
|
db_info_entry->cero_rating, info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-09-20 21:58:02 +00:00
|
|
|
|
|
|
|
if (db_info_entry->serial)
|
|
|
|
{
|
|
|
|
if (create_string_list_rdb_entry_string("Serial",
|
|
|
|
"Serial",
|
|
|
|
db_info_entry->serial, info->path, info->list) == -1)
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
snprintf(tmp, sizeof(tmp),
|
2015-06-19 16:02:55 +00:00
|
|
|
"%s : %s",
|
|
|
|
"Analog supported",
|
2015-06-25 14:50:34 +00:00
|
|
|
(db_info_entry->analog_supported == 1) ? menu_hash_to_str(MENU_VALUE_TRUE) :
|
|
|
|
(db_info_entry->analog_supported == -1) ? menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE) :
|
|
|
|
menu_hash_to_str(MENU_VALUE_FALSE));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp,
|
2015-06-19 19:50:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_ANALOG),
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
snprintf(tmp, sizeof(tmp),
|
2015-06-19 16:02:55 +00:00
|
|
|
"%s : %s",
|
|
|
|
"Rumble supported",
|
2015-06-25 14:50:34 +00:00
|
|
|
(db_info_entry->rumble_supported == 1) ? menu_hash_to_str(MENU_VALUE_TRUE) :
|
|
|
|
(db_info_entry->rumble_supported == -1) ? menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE) :
|
|
|
|
menu_hash_to_str(MENU_VALUE_FALSE));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, tmp,
|
2015-06-19 19:50:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_RUMBLE),
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-06-18 01:10:24 +00:00
|
|
|
if (!show_advanced_settings)
|
|
|
|
continue;
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info_entry->crc32)
|
|
|
|
{
|
2015-06-19 20:46:04 +00:00
|
|
|
if (create_string_list_rdb_entry_string(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_CRC32),
|
2015-06-19 08:08:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_CRC32),
|
|
|
|
crc_str,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-06-18 01:10:24 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info_entry->sha1)
|
|
|
|
{
|
2015-06-19 20:46:04 +00:00
|
|
|
if (create_string_list_rdb_entry_string(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_SHA1),
|
2015-06-19 08:08:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_SHA1),
|
|
|
|
db_info_entry->sha1,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-06-18 01:10:24 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info_entry->md5)
|
|
|
|
{
|
2015-06-19 20:46:04 +00:00
|
|
|
if (create_string_list_rdb_entry_string(
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RDB_ENTRY_MD5),
|
2015-06-19 08:08:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_MD5),
|
|
|
|
db_info_entry->md5,
|
2015-06-06 20:51:28 +00:00
|
|
|
info->path, info->list) == -1)
|
2015-05-25 23:58:52 +00:00
|
|
|
goto error;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-05-18 22:41:39 +00:00
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (db_info->count < 1)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 23:03:24 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
2015-07-04 15:20:49 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-26 00:08:18 +00:00
|
|
|
content_playlist_free(playlist);
|
2015-06-28 21:56:51 +00:00
|
|
|
database_info_list_free(db_info);
|
2015-05-25 23:58:52 +00:00
|
|
|
|
2015-05-18 22:41:39 +00:00
|
|
|
return 0;
|
2015-05-25 23:58:52 +00:00
|
|
|
|
|
|
|
error:
|
2015-05-26 00:08:18 +00:00
|
|
|
content_playlist_free(playlist);
|
2015-05-25 23:58:52 +00:00
|
|
|
|
|
|
|
return -1;
|
2015-05-27 04:24:51 +00:00
|
|
|
#else
|
|
|
|
return 0;
|
|
|
|
#endif
|
2015-05-18 22:41:39 +00:00
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-24 18:06:15 +00:00
|
|
|
static int menu_database_parse_query(file_list_t *list, const char *path,
|
2015-06-06 20:51:28 +00:00
|
|
|
const char *query)
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-06-26 10:38:33 +00:00
|
|
|
unsigned i;
|
2015-05-25 03:20:10 +00:00
|
|
|
database_info_list_t *db_list = database_info_list_new(path, query);
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-25 03:20:10 +00:00
|
|
|
if (!db_list)
|
2015-05-19 04:32:49 +00:00
|
|
|
return -1;
|
2015-05-24 18:15:30 +00:00
|
|
|
|
2015-05-25 03:20:10 +00:00
|
|
|
for (i = 0; i < db_list->count; i++)
|
|
|
|
{
|
2015-06-06 20:51:28 +00:00
|
|
|
if (db_list->list[i].name && db_list->list[i].name[0] != '\0')
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(list, db_list->list[i].name,
|
2015-06-10 20:43:06 +00:00
|
|
|
path, MENU_FILE_RDB_ENTRY, 0, 0);
|
2015-05-24 18:15:30 +00:00
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-25 03:20:10 +00:00
|
|
|
database_info_list_free(db_list);
|
2015-05-19 04:32:49 +00:00
|
|
|
#endif
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
static int deferred_push_video_shader_parameters_common(
|
|
|
|
menu_displaylist_info_t *info,
|
|
|
|
struct video_shader *shader, unsigned base_parameter)
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
size_t list_size = shader->num_parameters;
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-09-28 16:44:28 +00:00
|
|
|
if (list_size == 0)
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 07:53:07 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_SHADER_PARAMETERS),
|
|
|
|
"", 0, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
for (i = 0; i < list_size; i++)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, shader->parameters[i].desc,
|
2015-06-10 20:43:06 +00:00
|
|
|
info->label, base_parameter + i, 0, 0);
|
2015-05-18 22:41:39 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
#endif
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-11-02 02:20:55 +00:00
|
|
|
int menu_displaylist_parse_settings(void *data, menu_displaylist_info_t *info,
|
2015-10-24 08:52:12 +00:00
|
|
|
const char *info_label, unsigned parse_type, bool add_empty_entry)
|
2015-05-18 22:41:39 +00:00
|
|
|
{
|
2015-10-18 23:17:44 +00:00
|
|
|
enum setting_type precond;
|
|
|
|
size_t count = 0;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-10-22 17:17:47 +00:00
|
|
|
rarch_setting_t *setting = menu_setting_find(info_label);
|
|
|
|
uint64_t flags = menu_setting_get_flags(setting);
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-10-22 06:38:29 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-11-02 02:20:55 +00:00
|
|
|
|
2015-10-18 23:17:44 +00:00
|
|
|
switch (parse_type)
|
|
|
|
{
|
|
|
|
case PARSE_GROUP:
|
|
|
|
case PARSE_SUB_GROUP:
|
|
|
|
precond = ST_NONE;
|
|
|
|
break;
|
2015-10-22 02:29:40 +00:00
|
|
|
case PARSE_ACTION:
|
|
|
|
precond = ST_ACTION;
|
|
|
|
break;
|
2015-11-01 09:59:01 +00:00
|
|
|
case PARSE_ONLY_INT:
|
|
|
|
precond = ST_INT;
|
|
|
|
break;
|
2015-10-22 06:38:29 +00:00
|
|
|
case PARSE_ONLY_UINT:
|
|
|
|
precond = ST_UINT;
|
|
|
|
break;
|
2015-10-25 09:41:53 +00:00
|
|
|
case PARSE_ONLY_BIND:
|
|
|
|
precond = ST_BIND;
|
|
|
|
break;
|
2015-10-24 08:31:11 +00:00
|
|
|
case PARSE_ONLY_BOOL:
|
|
|
|
precond = ST_BOOL;
|
|
|
|
break;
|
|
|
|
case PARSE_ONLY_FLOAT:
|
|
|
|
precond = ST_FLOAT;
|
|
|
|
break;
|
2015-10-18 23:43:03 +00:00
|
|
|
case PARSE_ONLY_GROUP:
|
2015-10-18 23:17:44 +00:00
|
|
|
default:
|
|
|
|
precond = ST_END_GROUP;
|
|
|
|
break;
|
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-10-22 02:29:40 +00:00
|
|
|
for (;;)
|
2015-05-18 22:41:39 +00:00
|
|
|
{
|
2015-10-22 02:29:40 +00:00
|
|
|
bool time_to_exit = false;
|
2015-09-28 00:28:34 +00:00
|
|
|
const char *short_description = menu_setting_get_short_description(setting);
|
|
|
|
const char *name = menu_setting_get_name(setting);
|
2015-10-18 23:17:44 +00:00
|
|
|
enum setting_type type = menu_setting_get_type(setting);
|
2015-09-28 00:28:34 +00:00
|
|
|
|
2015-10-18 23:17:44 +00:00
|
|
|
switch (parse_type)
|
2015-06-15 01:57:01 +00:00
|
|
|
{
|
2015-10-18 23:17:44 +00:00
|
|
|
case PARSE_NONE:
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case ST_GROUP:
|
|
|
|
case ST_SUB_GROUP:
|
|
|
|
case ST_END_SUB_GROUP:
|
2015-10-22 02:29:40 +00:00
|
|
|
goto loop;
|
2015-10-18 23:17:44 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case PARSE_GROUP:
|
2015-10-18 23:43:03 +00:00
|
|
|
case PARSE_ONLY_GROUP:
|
2015-10-18 23:17:44 +00:00
|
|
|
if (type == ST_GROUP)
|
|
|
|
break;
|
2015-10-22 02:29:40 +00:00
|
|
|
goto loop;
|
2015-10-18 23:17:44 +00:00
|
|
|
case PARSE_SUB_GROUP:
|
2015-06-15 01:57:01 +00:00
|
|
|
break;
|
2015-10-22 02:29:40 +00:00
|
|
|
case PARSE_ACTION:
|
|
|
|
if (type == ST_ACTION)
|
|
|
|
break;
|
|
|
|
goto loop;
|
2015-11-01 09:59:01 +00:00
|
|
|
case PARSE_ONLY_INT:
|
|
|
|
if (type == ST_INT)
|
|
|
|
break;
|
|
|
|
goto loop;
|
2015-10-22 06:38:29 +00:00
|
|
|
case PARSE_ONLY_UINT:
|
|
|
|
if (type == ST_UINT)
|
|
|
|
break;
|
|
|
|
goto loop;
|
2015-10-25 09:41:53 +00:00
|
|
|
case PARSE_ONLY_BIND:
|
|
|
|
if (type == ST_BIND)
|
|
|
|
break;
|
|
|
|
goto loop;
|
2015-10-24 08:31:11 +00:00
|
|
|
case PARSE_ONLY_BOOL:
|
|
|
|
if (type == ST_BOOL)
|
|
|
|
break;
|
|
|
|
goto loop;
|
|
|
|
case PARSE_ONLY_FLOAT:
|
|
|
|
if (type == ST_FLOAT)
|
|
|
|
break;
|
|
|
|
goto loop;
|
2015-06-15 01:57:01 +00:00
|
|
|
}
|
|
|
|
|
2015-09-28 00:16:07 +00:00
|
|
|
if (flags & SD_FLAG_ADVANCED &&
|
2015-06-15 01:57:01 +00:00
|
|
|
!settings->menu.show_advanced_settings)
|
2015-10-22 02:29:40 +00:00
|
|
|
goto loop;
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-10-22 02:46:05 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, short_description,
|
2015-09-28 00:28:34 +00:00
|
|
|
name, menu_setting_set_flags(setting), 0, 0);
|
2015-06-21 20:35:19 +00:00
|
|
|
count++;
|
2015-11-02 02:20:55 +00:00
|
|
|
|
2015-10-22 02:29:40 +00:00
|
|
|
loop:
|
|
|
|
switch (parse_type)
|
|
|
|
{
|
|
|
|
case PARSE_NONE:
|
|
|
|
case PARSE_GROUP:
|
|
|
|
case PARSE_ONLY_GROUP:
|
|
|
|
case PARSE_SUB_GROUP:
|
|
|
|
if (menu_setting_get_type(setting) == precond)
|
|
|
|
time_to_exit = true;
|
|
|
|
break;
|
2015-10-25 09:41:53 +00:00
|
|
|
case PARSE_ONLY_BIND:
|
2015-10-24 08:31:11 +00:00
|
|
|
case PARSE_ONLY_FLOAT:
|
|
|
|
case PARSE_ONLY_BOOL:
|
2015-11-01 09:59:01 +00:00
|
|
|
case PARSE_ONLY_INT:
|
2015-10-22 06:38:29 +00:00
|
|
|
case PARSE_ONLY_UINT:
|
2015-10-22 02:29:40 +00:00
|
|
|
case PARSE_ACTION:
|
|
|
|
time_to_exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (time_to_exit)
|
|
|
|
break;
|
|
|
|
menu_settings_list_increment(&setting);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-10-24 08:52:12 +00:00
|
|
|
if (count == 0 && add_empty_entry)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-21 20:35:19 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_SETTINGS_FOUND),
|
|
|
|
menu_hash_to_str(MENU_LABEL_NO_SETTINGS_FOUND),
|
|
|
|
0, 0, 0);
|
|
|
|
|
2015-05-18 22:41:39 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-05-13 11:31:34 +00:00
|
|
|
|
2015-06-11 13:15:36 +00:00
|
|
|
static int menu_displaylist_sort_playlist(const content_playlist_entry_t *a,
|
|
|
|
const content_playlist_entry_t *b)
|
|
|
|
{
|
2015-07-09 22:43:45 +00:00
|
|
|
if (!a->label || !b->label)
|
|
|
|
return 0;
|
|
|
|
|
2015-06-11 13:15:36 +00:00
|
|
|
return strcasecmp(a->label, b->label);
|
|
|
|
}
|
|
|
|
|
2015-06-08 15:02:14 +00:00
|
|
|
static int menu_displaylist_parse_horizontal_list(menu_displaylist_info_t *info)
|
2015-05-18 22:41:39 +00:00
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
char path_playlist[PATH_MAX_LENGTH], lpl_basename[PATH_MAX_LENGTH];
|
2015-09-08 17:44:50 +00:00
|
|
|
bool is_historylist = false;
|
2015-06-12 14:36:15 +00:00
|
|
|
content_playlist_t *playlist = NULL;
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
|
|
|
struct item_file *item = (struct item_file*)
|
2015-10-30 09:28:27 +00:00
|
|
|
menu_driver_list_get_entry(MENU_LIST_HORIZONTAL,
|
|
|
|
menu_driver_list_get_selection() - (menu_driver_list_get_size(MENU_LIST_TABS)+1));
|
2015-05-18 22:41:39 +00:00
|
|
|
|
2015-06-08 15:02:14 +00:00
|
|
|
if (!item)
|
2015-06-05 21:45:36 +00:00
|
|
|
return -1;
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-06-08 21:38:03 +00:00
|
|
|
strlcpy(lpl_basename, item->path, sizeof(lpl_basename));
|
|
|
|
path_remove_extension(lpl_basename);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-06-08 15:16:36 +00:00
|
|
|
if (menu->playlist)
|
|
|
|
content_playlist_free(menu->playlist);
|
|
|
|
|
|
|
|
fill_pathname_join(path_playlist,
|
|
|
|
settings->playlist_directory, item->path,
|
|
|
|
sizeof(path_playlist));
|
|
|
|
menu->playlist = content_playlist_init(path_playlist,
|
2015-07-25 22:40:24 +00:00
|
|
|
COLLECTION_SIZE);
|
2015-06-08 15:16:36 +00:00
|
|
|
strlcpy(menu->db_playlist_file, path_playlist, sizeof(menu->db_playlist_file));
|
2015-06-19 19:50:13 +00:00
|
|
|
strlcpy(path_playlist,
|
|
|
|
menu_hash_to_str(MENU_LABEL_COLLECTION),
|
|
|
|
sizeof(path_playlist));
|
2015-06-08 15:16:36 +00:00
|
|
|
playlist = menu->playlist;
|
|
|
|
|
2015-06-11 13:15:36 +00:00
|
|
|
content_playlist_qsort(playlist, menu_displaylist_sort_playlist);
|
|
|
|
|
2015-09-08 17:44:50 +00:00
|
|
|
if (!strcmp(lpl_basename, "content_history"))
|
|
|
|
is_historylist = true;
|
|
|
|
|
|
|
|
menu_displaylist_parse_playlist(info, playlist, path_playlist, is_historylist);
|
2015-06-08 15:16:36 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-06-22 20:10:14 +00:00
|
|
|
static int menu_displaylist_parse_load_content_settings(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
if (!menu)
|
|
|
|
return -1;
|
|
|
|
|
2015-07-27 15:18:10 +00:00
|
|
|
if (global->inited.main && (global->inited.core.type != CORE_TYPE_DUMMY))
|
2015-06-22 20:10:14 +00:00
|
|
|
{
|
2015-06-25 10:50:45 +00:00
|
|
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-22 20:10:14 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RESUME_CONTENT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_RESUME_CONTENT),
|
|
|
|
MENU_SETTING_ACTION_RUN, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-22 20:10:14 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RESTART_CONTENT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_RESTART_CONTENT),
|
|
|
|
MENU_SETTING_ACTION_RUN, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-22 21:15:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CLOSE_CONTENT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CLOSE_CONTENT),
|
2015-06-25 04:14:22 +00:00
|
|
|
MENU_SETTING_ACTION_CLOSE, 0, 0);
|
2015-06-22 21:15:45 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-22 20:10:14 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_TAKE_SCREENSHOT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_TAKE_SCREENSHOT),
|
|
|
|
MENU_SETTING_ACTION_SCREENSHOT, 0, 0);
|
|
|
|
|
2015-11-01 09:59:01 +00:00
|
|
|
menu_displaylist_parse_settings(menu, info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_STATE_SLOT), PARSE_ONLY_INT, true);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-22 20:10:14 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVE_STATE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SAVE_STATE),
|
|
|
|
MENU_SETTING_ACTION_SAVESTATE, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-22 20:10:14 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOAD_STATE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_STATE),
|
|
|
|
MENU_SETTING_ACTION_LOADSTATE, 0, 0);
|
2015-06-24 03:05:57 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 03:05:57 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_OPTIONS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_OPTIONS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-07-27 15:18:10 +00:00
|
|
|
if (global->has_set.input_descriptors)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 03:05:57 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_INPUT_REMAPPING_OPTIONS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 03:05:57 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_CHEAT_OPTIONS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_CHEAT_OPTIONS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-07-27 15:18:10 +00:00
|
|
|
if ((global->inited.core.type != CORE_TYPE_DUMMY) && system && system->disk_control.get_num_images)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 03:05:57 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DISK_OPTIONS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_DISK_OPTIONS),
|
2015-06-25 07:15:34 +00:00
|
|
|
MENU_SETTING_ACTION_CORE_DISK_OPTIONS, 0, 0);
|
2015-06-24 05:38:45 +00:00
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 05:38:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SHADER_OPTIONS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SHADER_OPTIONS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
2015-11-08 15:51:14 +00:00
|
|
|
#ifdef HAVE_CHEEVOS
|
2015-11-08 02:58:50 +00:00
|
|
|
menu_entries_push(info->list,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACHIEVEMENT_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_ACHIEVEMENT_LIST),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-11-08 03:10:51 +00:00
|
|
|
#endif
|
2015-06-22 20:10:14 +00:00
|
|
|
}
|
|
|
|
else
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-22 20:10:14 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
2015-10-29 13:48:55 +00:00
|
|
|
"", MENU_SETTING_NO_ITEM, 0, 0);
|
2015-06-22 20:10:14 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-07-23 17:44:59 +00:00
|
|
|
static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-08-19 22:49:44 +00:00
|
|
|
unsigned idx = rpl_entry_selection_ptr;
|
2015-07-23 17:44:59 +00:00
|
|
|
const char *label = NULL;
|
|
|
|
const char *core_path = NULL;
|
|
|
|
const char *core_name = NULL;
|
|
|
|
const char *db_name = NULL;
|
|
|
|
|
|
|
|
if (!menu)
|
|
|
|
return -1;
|
|
|
|
|
2015-07-27 15:18:10 +00:00
|
|
|
if (global->inited.main && (global->inited.core.type != CORE_TYPE_DUMMY)
|
|
|
|
&& !strcmp(menu->deferred_path, global->path.fullpath))
|
2015-07-23 17:44:59 +00:00
|
|
|
menu_displaylist_parse_load_content_settings(info);
|
|
|
|
else
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, "Run", "collection",
|
2015-07-23 17:44:59 +00:00
|
|
|
MENU_FILE_PLAYLIST_ENTRY, 0, idx);
|
|
|
|
|
|
|
|
content_playlist_get_index(menu->playlist, idx,
|
|
|
|
NULL, &label, &core_path, &core_name, NULL, &db_name);
|
|
|
|
|
|
|
|
if (db_name && db_name[0] != '\0')
|
|
|
|
{
|
|
|
|
char db_path[PATH_MAX_LENGTH] = {0};
|
|
|
|
|
|
|
|
fill_pathname_join(db_path, settings->content_database,
|
|
|
|
db_name, sizeof(db_path));
|
|
|
|
path_remove_extension(db_path);
|
|
|
|
strlcat(db_path, ".rdb", sizeof(db_path));
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, label,
|
2015-07-23 17:44:59 +00:00
|
|
|
db_path, MENU_FILE_RDB_ENTRY, 0, idx);
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-24 02:56:44 +00:00
|
|
|
static int menu_displaylist_parse_information_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
global_t *global = global_get_ptr();
|
2015-09-24 01:48:08 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-06-24 02:56:44 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 02:56:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_INFORMATION),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_INFORMATION),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 02:56:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_INFORMATION),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SYSTEM_INFORMATION),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_DATABASE_MANAGER),
|
2015-06-24 02:56:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_DATABASE_MANAGER_LIST),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_CURSOR_MANAGER),
|
2015-06-24 02:56:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CURSOR_MANAGER_LIST),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (global->perfcnt_enable)
|
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 02:56:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_FRONTEND_COUNTERS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_FRONTEND_COUNTERS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 02:56:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_COUNTERS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_COUNTERS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
}
|
|
|
|
|
2015-10-03 00:45:40 +00:00
|
|
|
if(settings->debug_panel_enable)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-10-03 00:45:40 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DEBUG_INFORMATION),
|
|
|
|
menu_hash_to_str(MENU_LABEL_DEBUG_INFORMATION),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-06-24 02:56:44 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-07-03 23:51:41 +00:00
|
|
|
static int menu_displaylist_parse_add_content_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
|
|
|
(void)global;
|
|
|
|
|
2015-07-04 01:37:43 +00:00
|
|
|
#ifdef HAVE_NETWORKING
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-04 01:37:43 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DOWNLOAD_CORE_CONTENT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_DOWNLOAD_CORE_CONTENT),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
|
|
|
|
2015-07-03 23:51:41 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-03 23:51:41 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SCAN_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SCAN_DIRECTORY),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-03 23:51:41 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SCAN_FILE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SCAN_FILE),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-10-24 17:37:59 +00:00
|
|
|
static int menu_displaylist_parse_scan_directory_list(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
|
|
|
(void)global;
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBRETRODB
|
|
|
|
menu_entries_push(info->list,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SCAN_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SCAN_DIRECTORY),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
static int menu_displaylist_parse_options(menu_displaylist_info_t *info)
|
|
|
|
{
|
2015-06-24 11:36:58 +00:00
|
|
|
#ifdef HAVE_NETWORKING
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 11:36:58 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_UPDATER_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_UPDATER_LIST),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-06-24 13:12:30 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-04 04:18:02 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_CORE_INFO_FILES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_CORE_INFO_FILES),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 13:12:30 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_ASSETS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_ASSETS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 13:12:30 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_AUTOCONFIG_PROFILES),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 13:12:30 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_CHEATS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_CHEATS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
2015-06-25 06:24:03 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 13:12:30 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_DATABASES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_DATABASES),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-06-25 06:24:03 +00:00
|
|
|
#endif
|
2015-06-24 13:12:30 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 13:12:30 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_OVERLAYS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_OVERLAYS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
|
|
|
#ifdef HAVE_CG
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 13:12:30 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_CG_SHADERS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_CG_SHADERS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_GLSL
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 13:12:30 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_GLSL_SHADERS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_UPDATE_GLSL_SHADERS),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
2015-06-24 04:09:03 +00:00
|
|
|
#else
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-24 04:09:03 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
2015-10-29 14:00:29 +00:00
|
|
|
"", MENU_SETTING_NO_ITEM, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
#endif
|
2015-05-13 11:45:53 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
static int menu_displaylist_parse_options_cheats(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
cheat_manager_t *cheat = global ? global->cheat : NULL;
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!cheat)
|
2015-05-13 11:45:53 +00:00
|
|
|
{
|
2015-05-19 04:32:49 +00:00
|
|
|
global->cheat = cheat_manager_new(0);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!global->cheat)
|
|
|
|
return -1;
|
|
|
|
cheat = global->cheat;
|
|
|
|
}
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 06:43:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEAT_FILE_LOAD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CHEAT_FILE_LOAD),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 06:43:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEAT_FILE_SAVE_AS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CHEAT_FILE_SAVE_AS),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:40:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEAT_NUM_PASSES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CHEAT_NUM_PASSES),
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:40:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEAT_APPLY_CHANGES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CHEAT_APPLY_CHANGES),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-09-06 01:51:08 +00:00
|
|
|
for (i = 0; i < cheat_manager_get_size(cheat); i++)
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-06-12 14:36:15 +00:00
|
|
|
char cheat_label[64] = {0};
|
|
|
|
|
2015-06-21 06:17:00 +00:00
|
|
|
snprintf(cheat_label, sizeof(cheat_label), "%s #%u: ", menu_hash_to_str(MENU_VALUE_CHEAT), i);
|
2015-09-06 01:51:08 +00:00
|
|
|
if (cheat_manager_get_desc(cheat, i))
|
|
|
|
strlcat(cheat_label, cheat_manager_get_desc(cheat, i), sizeof(cheat_label));
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, cheat_label, "", MENU_SETTINGS_CHEAT_BEGIN + i, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-05-13 11:45:53 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
static int menu_displaylist_parse_options_remappings(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
unsigned p, retro_id;
|
2015-06-25 10:50:45 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
2015-10-22 06:38:29 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-23 01:00:49 +00:00
|
|
|
for (p = 0; p < settings->input.max_users; p++)
|
|
|
|
{
|
2015-10-23 01:02:31 +00:00
|
|
|
char key_type[PATH_MAX_LENGTH], key_analog[PATH_MAX_LENGTH];
|
2015-10-23 01:00:49 +00:00
|
|
|
snprintf(key_type, sizeof(key_type),
|
|
|
|
"input_libretro_device_p%u", p + 1);
|
2015-10-23 01:02:31 +00:00
|
|
|
snprintf(key_analog, sizeof(key_analog),
|
|
|
|
"input_player%u_analog_dpad_mode", p + 1);
|
2015-10-23 01:00:49 +00:00
|
|
|
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
key_type, PARSE_ONLY_UINT, true);
|
2015-10-23 01:02:31 +00:00
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
key_analog, PARSE_ONLY_UINT, true);
|
2015-10-23 01:00:49 +00:00
|
|
|
}
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 06:00:56 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REMAP_FILE_LOAD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_REMAP_FILE_LOAD),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 06:00:56 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REMAP_FILE_SAVE_AS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_REMAP_FILE_SAVE_AS),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:40:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REMAP_FILE_SAVE_CORE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_REMAP_FILE_SAVE_CORE),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 20:40:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REMAP_FILE_SAVE_GAME),
|
|
|
|
menu_hash_to_str(MENU_LABEL_REMAP_FILE_SAVE_GAME),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-22 06:40:08 +00:00
|
|
|
for (p = 0; p < settings->input.max_users; p++)
|
|
|
|
{
|
2015-05-21 02:11:20 +00:00
|
|
|
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND + 4; retro_id++)
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
char desc_label[64];
|
2015-06-12 14:36:15 +00:00
|
|
|
unsigned user = p + 1;
|
|
|
|
unsigned desc_offset = retro_id;
|
|
|
|
const char *description = NULL;
|
2015-05-21 02:11:20 +00:00
|
|
|
|
|
|
|
if (desc_offset >= RARCH_FIRST_CUSTOM_BIND)
|
|
|
|
desc_offset = RARCH_FIRST_CUSTOM_BIND + (desc_offset - RARCH_FIRST_CUSTOM_BIND) * 2;
|
|
|
|
|
2015-06-25 10:50:45 +00:00
|
|
|
description = system ? system->input_desc_btn[p][desc_offset] : NULL;
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
if (!description)
|
|
|
|
continue;
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
snprintf(desc_label, sizeof(desc_label),
|
2015-06-21 06:22:23 +00:00
|
|
|
"%s %u %s : ", menu_hash_to_str(MENU_VALUE_USER), user, description);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, desc_label, "",
|
2015-05-21 02:11:20 +00:00
|
|
|
MENU_SETTINGS_INPUT_DESC_BEGIN +
|
2015-06-10 20:43:06 +00:00
|
|
|
(p * (RARCH_FIRST_CUSTOM_BIND + 4)) + retro_id, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
}
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool horizontal)
|
2015-05-21 20:22:37 +00:00
|
|
|
{
|
2015-07-04 00:07:18 +00:00
|
|
|
bool path_is_compressed, push_dir, filter_ext;
|
2015-05-21 20:22:37 +00:00
|
|
|
size_t i, list_size;
|
2015-06-12 14:36:15 +00:00
|
|
|
struct string_list *str_list = NULL;
|
2015-05-22 23:17:17 +00:00
|
|
|
int device = 0;
|
2015-05-21 20:22:37 +00:00
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-06-17 17:55:24 +00:00
|
|
|
uint32_t hash_label = menu_hash_calculate(info->label);
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-05-22 23:17:17 +00:00
|
|
|
(void)device;
|
|
|
|
|
2015-05-21 20:22:37 +00:00
|
|
|
if (!*info->path)
|
|
|
|
{
|
2015-06-15 20:45:02 +00:00
|
|
|
if (frontend_driver_parse_drive_list(info->list) != 0)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, "/", "",
|
2015-06-15 20:45:02 +00:00
|
|
|
MENU_FILE_DIRECTORY, 0, 0);
|
2015-05-21 20:22:37 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
path_is_compressed = path_is_compressed_file(info->path);
|
2015-10-11 11:16:38 +00:00
|
|
|
push_dir = (menu_setting_get_browser_selection_type(info->setting) == ST_DIR);
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-07-04 00:07:18 +00:00
|
|
|
filter_ext = settings->menu.navigation.browser.filter.supported_extensions_enable;
|
|
|
|
|
|
|
|
if (hash_label == MENU_LABEL_SCAN_FILE)
|
|
|
|
filter_ext = false;
|
|
|
|
|
2015-05-21 20:22:37 +00:00
|
|
|
if (path_is_compressed)
|
|
|
|
str_list = compressed_file_list_new(info->path, info->exts);
|
|
|
|
else
|
|
|
|
str_list = dir_list_new(info->path,
|
2015-07-04 00:07:18 +00:00
|
|
|
filter_ext ? info->exts : NULL,
|
2015-08-30 18:04:40 +00:00
|
|
|
true, true);
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-07-03 23:51:41 +00:00
|
|
|
if (hash_label == MENU_LABEL_SCAN_DIRECTORY)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-03 23:51:41 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SCAN_THIS_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_SCAN_THIS_DIRECTORY),
|
|
|
|
MENU_FILE_SCAN_DIRECTORY, 0 ,0);
|
|
|
|
|
2015-05-21 20:22:37 +00:00
|
|
|
if (push_dir)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 01:08:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_USE_THIS_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_USE_THIS_DIRECTORY),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_FILE_USE_DIRECTORY, 0 ,0);
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-10-25 22:26:57 +00:00
|
|
|
if (!horizontal && hash_label != MENU_LABEL_CORE_LIST)
|
2015-10-25 07:31:55 +00:00
|
|
|
{
|
|
|
|
char out_dir[PATH_MAX_LENGTH];
|
|
|
|
fill_pathname_parent_dir(out_dir, info->path, sizeof(out_dir));
|
|
|
|
|
|
|
|
if (out_dir[0] != '\0')
|
|
|
|
{
|
|
|
|
menu_entries_push(info->list, "..", info->path,
|
|
|
|
MENU_FILE_PARENT_DIRECTORY, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-21 20:22:37 +00:00
|
|
|
if (!str_list)
|
|
|
|
{
|
|
|
|
const char *str = path_is_compressed
|
2015-06-19 01:06:21 +00:00
|
|
|
? menu_hash_to_str(MENU_LABEL_VALUE_UNABLE_TO_READ_COMPRESSED_FILE)
|
|
|
|
: menu_hash_to_str(MENU_LABEL_VALUE_DIRECTORY_NOT_FOUND);
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, str, "", 0, 0, 0);
|
2015-05-21 20:22:37 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
dir_list_sort(str_list, true);
|
|
|
|
|
|
|
|
list_size = str_list->size;
|
|
|
|
|
2015-09-28 16:44:28 +00:00
|
|
|
if (list_size == 0)
|
2015-05-21 20:22:37 +00:00
|
|
|
{
|
2015-06-10 12:08:10 +00:00
|
|
|
if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST))
|
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-19 01:06:21 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
2015-10-29 14:00:29 +00:00
|
|
|
"", MENU_SETTING_NO_ITEM, 0, 0);
|
2015-06-10 12:08:10 +00:00
|
|
|
}
|
|
|
|
|
2015-05-21 20:22:37 +00:00
|
|
|
string_list_free(str_list);
|
2015-06-10 12:08:10 +00:00
|
|
|
|
2015-05-21 20:22:37 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < list_size; i++)
|
|
|
|
{
|
|
|
|
bool is_dir;
|
2015-06-12 12:03:08 +00:00
|
|
|
const char *path = NULL;
|
|
|
|
char label[PATH_MAX_LENGTH] = {0};
|
|
|
|
menu_file_type_t file_type = MENU_FILE_NONE;
|
2015-05-21 20:22:37 +00:00
|
|
|
|
|
|
|
switch (str_list->elems[i].attr.i)
|
|
|
|
{
|
|
|
|
case RARCH_DIRECTORY:
|
|
|
|
file_type = MENU_FILE_DIRECTORY;
|
|
|
|
break;
|
|
|
|
case RARCH_COMPRESSED_ARCHIVE:
|
|
|
|
file_type = MENU_FILE_CARCHIVE;
|
|
|
|
break;
|
|
|
|
case RARCH_COMPRESSED_FILE_IN_ARCHIVE:
|
|
|
|
file_type = MENU_FILE_IN_CARCHIVE;
|
|
|
|
break;
|
|
|
|
case RARCH_PLAIN_FILE:
|
|
|
|
default:
|
2015-07-04 05:09:54 +00:00
|
|
|
if (hash_label == MENU_LABEL_DETECT_CORE_LIST ||
|
|
|
|
hash_label == MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST)
|
2015-05-21 20:22:37 +00:00
|
|
|
{
|
|
|
|
if (path_is_compressed_file(str_list->elems[i].data))
|
|
|
|
{
|
|
|
|
/* in case of deferred_core_list we have to interpret
|
|
|
|
* every archive as an archive to disallow instant loading
|
|
|
|
*/
|
|
|
|
file_type = MENU_FILE_CARCHIVE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file_type = (menu_file_type_t)info->type_default;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
is_dir = (file_type == MENU_FILE_DIRECTORY);
|
|
|
|
|
|
|
|
if (push_dir && !is_dir)
|
|
|
|
continue;
|
2015-07-04 00:15:34 +00:00
|
|
|
if (hash_label == MENU_LABEL_SCAN_DIRECTORY && !is_dir)
|
|
|
|
continue;
|
2015-05-21 20:22:37 +00:00
|
|
|
|
|
|
|
/* Need to preserve slash first time. */
|
|
|
|
path = str_list->elems[i].data;
|
|
|
|
|
|
|
|
if (*info->path && !path_is_compressed)
|
|
|
|
path = path_basename(path);
|
|
|
|
|
2015-05-21 20:40:31 +00:00
|
|
|
/* Push type further down in the chain.
|
|
|
|
* Needed for shader manager currently. */
|
2015-06-05 15:49:19 +00:00
|
|
|
switch (hash_label)
|
2015-05-21 20:40:31 +00:00
|
|
|
{
|
2015-06-05 15:49:19 +00:00
|
|
|
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
2015-10-19 15:10:35 +00:00
|
|
|
if (is_dir && !horizontal)
|
2015-10-11 19:32:14 +00:00
|
|
|
file_type = MENU_FILE_DIRECTORY;
|
2015-10-19 15:10:35 +00:00
|
|
|
else if (is_dir && horizontal)
|
|
|
|
continue;
|
2015-10-11 19:32:14 +00:00
|
|
|
else
|
|
|
|
file_type = MENU_FILE_PLAYLIST_COLLECTION;
|
2015-06-05 15:49:19 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CORE_LIST:
|
2015-05-21 20:22:37 +00:00
|
|
|
#ifdef HAVE_LIBRETRO_MANAGEMENT
|
|
|
|
#ifdef RARCH_CONSOLE
|
2015-06-05 15:49:19 +00:00
|
|
|
if (is_dir || strcasecmp(path, SALAMANDER_FILE) == 0)
|
|
|
|
continue;
|
2015-05-21 20:22:37 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2015-06-05 15:49:19 +00:00
|
|
|
/* Compressed cores are unsupported */
|
|
|
|
if (file_type == MENU_FILE_CARCHIVE)
|
|
|
|
continue;
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-06-05 15:49:19 +00:00
|
|
|
file_type = is_dir ? MENU_FILE_DIRECTORY : MENU_FILE_CORE;
|
|
|
|
break;
|
2015-05-21 20:22:37 +00:00
|
|
|
}
|
2015-05-21 20:40:31 +00:00
|
|
|
|
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
|
|
|
{
|
2015-06-28 15:02:01 +00:00
|
|
|
switch (rarch_path_is_media_type(path))
|
2015-06-23 04:13:57 +00:00
|
|
|
{
|
2015-06-23 05:25:48 +00:00
|
|
|
case RARCH_CONTENT_MOVIE:
|
2015-06-28 15:21:32 +00:00
|
|
|
#ifdef HAVE_FFMPEG
|
|
|
|
if (settings->multimedia.builtin_mediaplayer_enable)
|
|
|
|
file_type = MENU_FILE_MOVIE;
|
|
|
|
#endif
|
2015-06-23 04:13:57 +00:00
|
|
|
break;
|
2015-06-23 05:25:48 +00:00
|
|
|
case RARCH_CONTENT_MUSIC:
|
2015-06-28 15:21:32 +00:00
|
|
|
#ifdef HAVE_FFMPEG
|
|
|
|
if (settings->multimedia.builtin_mediaplayer_enable)
|
|
|
|
file_type = MENU_FILE_MUSIC;
|
|
|
|
#endif
|
2015-06-23 04:13:57 +00:00
|
|
|
break;
|
2015-06-28 15:02:01 +00:00
|
|
|
case RARCH_CONTENT_IMAGE:
|
2015-06-28 16:55:00 +00:00
|
|
|
#ifdef HAVE_IMAGEVIEWER
|
2015-07-04 13:23:28 +00:00
|
|
|
if (settings->multimedia.builtin_imageviewer_enable
|
|
|
|
&& hash_label != MENU_LABEL_MENU_WALLPAPER)
|
2015-06-28 15:21:32 +00:00
|
|
|
file_type = MENU_FILE_IMAGEVIEWER;
|
2015-06-28 16:55:00 +00:00
|
|
|
#endif
|
2015-06-23 05:25:48 +00:00
|
|
|
default:
|
|
|
|
break;
|
2015-06-23 04:13:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, path, label,
|
2015-06-10 20:43:06 +00:00
|
|
|
file_type, 0, 0);
|
2015-05-21 20:22:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
string_list_free(str_list);
|
|
|
|
|
2015-06-05 21:36:47 +00:00
|
|
|
switch (hash_label)
|
2015-05-21 20:22:37 +00:00
|
|
|
{
|
2015-06-05 21:36:47 +00:00
|
|
|
case MENU_LABEL_CORE_LIST:
|
|
|
|
{
|
|
|
|
const char *dir = NULL;
|
2015-06-12 14:36:15 +00:00
|
|
|
|
2015-10-17 16:45:14 +00:00
|
|
|
menu_entries_get_last_stack(&dir, NULL, NULL, NULL);
|
2015-06-12 14:36:15 +00:00
|
|
|
|
2015-06-05 21:36:47 +00:00
|
|
|
list_size = file_list_get_size(info->list);
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-06-05 21:36:47 +00:00
|
|
|
for (i = 0; i < list_size; i++)
|
|
|
|
{
|
2015-09-26 00:47:17 +00:00
|
|
|
char core_path[PATH_MAX_LENGTH], display_name[PATH_MAX_LENGTH];
|
|
|
|
unsigned type = 0;
|
2015-06-12 14:36:15 +00:00
|
|
|
const char *path = NULL;
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-10-18 19:54:20 +00:00
|
|
|
menu_entries_get_at_offset(info->list, i, &path, NULL, &type, NULL,
|
|
|
|
NULL);
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-06-05 21:36:47 +00:00
|
|
|
if (type != MENU_FILE_CORE)
|
|
|
|
continue;
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-06-05 21:36:47 +00:00
|
|
|
fill_pathname_join(core_path, dir, path, sizeof(core_path));
|
2015-05-21 20:22:37 +00:00
|
|
|
|
2015-07-27 15:18:10 +00:00
|
|
|
if (core_info_list_get_display_name(global->core_info.list,
|
2015-06-05 21:36:47 +00:00
|
|
|
core_path, display_name, sizeof(display_name)))
|
2015-10-19 15:12:03 +00:00
|
|
|
menu_entries_set_alt_at_offset(info->list, i, display_name);
|
2015-06-05 21:36:47 +00:00
|
|
|
}
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_sort = true;
|
2015-06-05 21:36:47 +00:00
|
|
|
}
|
|
|
|
break;
|
2015-05-21 20:22:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-10-31 15:27:48 +00:00
|
|
|
bool menu_playlist_find_associated_core(const char *path, char *s, size_t len)
|
|
|
|
{
|
|
|
|
bool ret = false;
|
|
|
|
unsigned j;
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
struct string_list *existing_core_names = string_split(settings->playlist_names, ";");
|
|
|
|
struct string_list *existing_core_paths = string_split(settings->playlist_cores, ";");
|
|
|
|
|
|
|
|
for (j = 0; j < existing_core_names->size; j++)
|
|
|
|
{
|
|
|
|
if (!strcmp(path, existing_core_names->elems[j].data))
|
|
|
|
{
|
|
|
|
if (existing_core_paths)
|
|
|
|
{
|
|
|
|
const char *existing_core = existing_core_paths->elems[j].data;
|
|
|
|
|
|
|
|
if (existing_core)
|
2015-10-31 16:24:28 +00:00
|
|
|
{
|
2015-10-31 15:27:48 +00:00
|
|
|
strlcpy(s, existing_core, len);
|
2015-10-31 16:24:28 +00:00
|
|
|
ret = true;
|
|
|
|
}
|
2015-10-31 15:27:48 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
string_list_free(existing_core_names);
|
|
|
|
string_list_free(existing_core_paths);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2015-09-21 19:32:23 +00:00
|
|
|
int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-10-26 21:45:12 +00:00
|
|
|
size_t i;
|
2015-06-25 10:50:45 +00:00
|
|
|
int ret = 0;
|
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
2015-10-19 23:54:04 +00:00
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
struct video_shader *shader = video_shader_driver_get_current_shader();
|
|
|
|
#endif
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-10-22 02:12:32 +00:00
|
|
|
if (menu_driver_list_push(info, type))
|
|
|
|
return 0;
|
|
|
|
|
2015-08-17 16:23:53 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case DISPLAYLIST_HELP_SCREEN_LIST:
|
|
|
|
case DISPLAYLIST_MAIN_MENU:
|
|
|
|
case DISPLAYLIST_SETTINGS:
|
2015-09-06 17:49:51 +00:00
|
|
|
case DISPLAYLIST_SETTINGS_ALL:
|
2015-08-17 16:23:53 +00:00
|
|
|
case DISPLAYLIST_HORIZONTAL:
|
|
|
|
case DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS:
|
|
|
|
case DISPLAYLIST_CONTENT_SETTINGS:
|
|
|
|
case DISPLAYLIST_INFORMATION_LIST:
|
|
|
|
case DISPLAYLIST_ADD_CONTENT_LIST:
|
2015-10-24 17:37:59 +00:00
|
|
|
case DISPLAYLIST_SCAN_DIRECTORY_LIST:
|
2015-08-17 16:23:53 +00:00
|
|
|
case DISPLAYLIST_LOAD_CONTENT_LIST:
|
2015-10-23 04:54:33 +00:00
|
|
|
case DISPLAYLIST_USER_BINDS_LIST:
|
2015-10-17 13:28:16 +00:00
|
|
|
case DISPLAYLIST_ACCOUNTS_LIST:
|
2015-10-17 13:58:59 +00:00
|
|
|
case DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST:
|
2015-08-17 16:23:53 +00:00
|
|
|
case DISPLAYLIST_OPTIONS:
|
|
|
|
case DISPLAYLIST_OPTIONS_CHEATS:
|
|
|
|
case DISPLAYLIST_OPTIONS_REMAPPINGS:
|
2015-08-30 22:52:42 +00:00
|
|
|
case DISPLAYLIST_SHADER_PARAMETERS:
|
2015-08-17 16:23:53 +00:00
|
|
|
case DISPLAYLIST_SHADER_PARAMETERS_PRESET:
|
|
|
|
case DISPLAYLIST_PERFCOUNTERS_CORE:
|
|
|
|
case DISPLAYLIST_PERFCOUNTERS_FRONTEND:
|
|
|
|
case DISPLAYLIST_DATABASE_ENTRY:
|
|
|
|
case DISPLAYLIST_DATABASE_QUERY:
|
|
|
|
case DISPLAYLIST_OPTIONS_SHADERS:
|
|
|
|
case DISPLAYLIST_CORE_CONTENT:
|
|
|
|
case DISPLAYLIST_PLAYLIST_COLLECTION:
|
|
|
|
case DISPLAYLIST_HISTORY:
|
|
|
|
case DISPLAYLIST_OPTIONS_DISK:
|
|
|
|
case DISPLAYLIST_SYSTEM_INFO:
|
2015-09-24 01:48:08 +00:00
|
|
|
case DISPLAYLIST_DEBUG_INFO:
|
2015-11-08 02:58:50 +00:00
|
|
|
case DISPLAYLIST_ACHIEVEMENT_LIST:
|
2015-09-06 17:49:51 +00:00
|
|
|
case DISPLAYLIST_CORES:
|
|
|
|
case DISPLAYLIST_CORES_DETECTED:
|
|
|
|
case DISPLAYLIST_CORES_UPDATER:
|
2015-08-17 16:23:53 +00:00
|
|
|
case DISPLAYLIST_CORES_SUPPORTED:
|
|
|
|
case DISPLAYLIST_CORES_COLLECTION_SUPPORTED:
|
|
|
|
case DISPLAYLIST_CORE_INFO:
|
|
|
|
case DISPLAYLIST_CORE_OPTIONS:
|
|
|
|
case DISPLAYLIST_DEFAULT:
|
|
|
|
case DISPLAYLIST_SHADER_PASS:
|
|
|
|
case DISPLAYLIST_SHADER_PRESET:
|
|
|
|
case DISPLAYLIST_DATABASES:
|
|
|
|
case DISPLAYLIST_DATABASE_CURSORS:
|
|
|
|
case DISPLAYLIST_DATABASE_PLAYLISTS:
|
2015-09-06 17:49:51 +00:00
|
|
|
case DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL:
|
2015-08-17 16:23:53 +00:00
|
|
|
case DISPLAYLIST_VIDEO_FILTERS:
|
2015-10-25 09:41:53 +00:00
|
|
|
case DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST:
|
2015-10-24 08:31:11 +00:00
|
|
|
case DISPLAYLIST_INPUT_SETTINGS_LIST:
|
2015-10-25 08:38:53 +00:00
|
|
|
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
|
2015-08-17 16:23:53 +00:00
|
|
|
case DISPLAYLIST_AUDIO_FILTERS:
|
|
|
|
case DISPLAYLIST_IMAGES:
|
|
|
|
case DISPLAYLIST_OVERLAYS:
|
|
|
|
case DISPLAYLIST_FONTS:
|
|
|
|
case DISPLAYLIST_CHEAT_FILES:
|
|
|
|
case DISPLAYLIST_REMAP_FILES:
|
|
|
|
case DISPLAYLIST_RECORD_CONFIG_FILES:
|
|
|
|
case DISPLAYLIST_CONFIG_FILES:
|
|
|
|
case DISPLAYLIST_CONTENT_HISTORY:
|
|
|
|
case DISPLAYLIST_ARCHIVE_ACTION:
|
|
|
|
case DISPLAYLIST_ARCHIVE_ACTION_DETECT_CORE:
|
2015-10-18 19:44:44 +00:00
|
|
|
menu_entries_clear(info->list);
|
2015-08-17 16:23:53 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-05-19 04:32:49 +00:00
|
|
|
switch (type)
|
2015-05-13 11:45:53 +00:00
|
|
|
{
|
2015-06-06 19:55:35 +00:00
|
|
|
case DISPLAYLIST_NONE:
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_INFO:
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0);
|
2015-06-06 19:55:35 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_GENERIC:
|
2015-09-25 13:15:31 +00:00
|
|
|
{
|
|
|
|
bool pending_push = true;
|
|
|
|
menu_driver_list_cache(MENU_LIST_PLAIN, 0);
|
2015-06-06 19:55:35 +00:00
|
|
|
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0);
|
2015-09-25 13:15:31 +00:00
|
|
|
menu_navigation_ctl(MENU_NAVIGATION_CTL_CLEAR, &pending_push);
|
2015-10-22 01:54:34 +00:00
|
|
|
menu_entries_set_refresh(false);
|
2015-09-25 13:15:31 +00:00
|
|
|
}
|
2015-06-06 19:55:35 +00:00
|
|
|
break;
|
2015-10-23 04:54:33 +00:00
|
|
|
case DISPLAYLIST_USER_BINDS_LIST:
|
|
|
|
{
|
|
|
|
char lbl[PATH_MAX_LENGTH];
|
|
|
|
snprintf(lbl, sizeof(lbl),
|
|
|
|
"Input User %.1s Binds", info->path);
|
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
lbl, PARSE_NONE, true);
|
2015-10-23 04:54:33 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
|
|
|
}
|
|
|
|
break;
|
2015-10-17 13:28:16 +00:00
|
|
|
case DISPLAYLIST_ACCOUNTS_LIST:
|
2015-10-19 23:47:32 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_LIST_END),
|
2015-10-24 08:52:12 +00:00
|
|
|
PARSE_NONE, true);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-10-17 13:58:59 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST:
|
|
|
|
#ifdef HAVE_CHEEVOS
|
2015-10-19 23:35:08 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_CHEEVOS_SETTINGS),
|
2015-10-24 08:52:12 +00:00
|
|
|
PARSE_NONE, true);
|
2015-10-17 13:58:59 +00:00
|
|
|
#else
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-10-17 13:58:59 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS),
|
2015-10-29 14:00:29 +00:00
|
|
|
"", MENU_SETTING_NO_ITEM, 0, 0);
|
2015-10-26 02:29:08 +00:00
|
|
|
ret = 0;
|
2015-10-17 13:28:16 +00:00
|
|
|
#endif
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-10-17 13:28:16 +00:00
|
|
|
break;
|
2015-07-17 18:33:09 +00:00
|
|
|
case DISPLAYLIST_HELP_SCREEN_LIST:
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-17 18:33:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HELP_CONTROLS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_CONTROLS),
|
|
|
|
0, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-18 09:29:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HELP_WHAT_IS_A_CORE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_WHAT_IS_A_CORE),
|
|
|
|
0, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-17 20:11:24 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HELP_LOADING_CONTENT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_LOADING_CONTENT),
|
|
|
|
0, 0, 0);
|
2015-07-18 12:57:20 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-18 12:57:20 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HELP_SCANNING_CONTENT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_SCANNING_CONTENT),
|
|
|
|
0, 0, 0);
|
|
|
|
#endif
|
2015-07-18 12:01:37 +00:00
|
|
|
#ifdef HAVE_OVERLAY
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-18 12:01:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD),
|
|
|
|
0, 0, 0);
|
|
|
|
#endif
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-07-18 12:57:20 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING),
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING),
|
|
|
|
0, 0, 0);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-07-17 18:33:09 +00:00
|
|
|
break;
|
2015-06-06 19:55:35 +00:00
|
|
|
case DISPLAYLIST_HELP:
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0);
|
2015-07-08 03:45:43 +00:00
|
|
|
menu->push_help_screen = false;
|
2015-06-06 19:55:35 +00:00
|
|
|
break;
|
2015-05-19 04:32:49 +00:00
|
|
|
case DISPLAYLIST_SETTINGS:
|
2015-10-24 08:52:12 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info, info->label, PARSE_NONE, true);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-10-18 23:00:47 +00:00
|
|
|
break;
|
2015-10-18 22:44:28 +00:00
|
|
|
case DISPLAYLIST_MAIN_MENU:
|
2015-10-22 04:11:59 +00:00
|
|
|
if (global->inited.main && (global->inited.core.type != CORE_TYPE_DUMMY))
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_DYNAMIC) || defined(HAVE_LIBRETRO_MANAGEMENT)
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_LIST), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#endif
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_LIST), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_HISTORY), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#if defined(HAVE_NETWORKING)
|
|
|
|
#if defined(HAVE_LIBRETRODB)
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_ADD_CONTENT_LIST), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#endif
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_ONLINE_UPDATER), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#endif
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SETTINGS), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INFORMATION_LIST), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#ifndef HAVE_DYNAMIC
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RESTART_RETROARCH), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#endif
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CONFIGURATIONS), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SAVE_NEW_CONFIG), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_LIST), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#if !defined(IOS)
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_QUIT_RETROARCH), PARSE_ACTION, false);
|
2015-10-22 04:11:59 +00:00
|
|
|
#endif
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
2015-10-25 08:38:53 +00:00
|
|
|
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
|
2015-10-25 09:25:07 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_HISTORY_LIST_ENABLE), PARSE_ONLY_BOOL, false);
|
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_CONTENT_HISTORY_SIZE), PARSE_ONLY_UINT, false);
|
2015-10-26 05:55:42 +00:00
|
|
|
{
|
2015-10-26 20:30:58 +00:00
|
|
|
struct string_list *str_list = dir_list_new_special(settings->playlist_directory, DIR_LIST_COLLECTIONS, NULL);
|
2015-10-31 12:33:57 +00:00
|
|
|
|
2015-10-26 20:06:14 +00:00
|
|
|
if (str_list && str_list->size)
|
2015-10-26 05:55:42 +00:00
|
|
|
{
|
2015-10-31 17:13:03 +00:00
|
|
|
unsigned i;
|
2015-10-31 15:07:52 +00:00
|
|
|
char new_playlist_names[PATH_MAX_LENGTH] = {0};
|
|
|
|
char new_playlist_cores[PATH_MAX_LENGTH] = {0};
|
2015-10-31 12:29:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
struct string_list *str_list2 = NULL;
|
|
|
|
|
|
|
|
if (settings->playlist_names[0] == '\0' && settings->playlist_cores[0] == '\0')
|
|
|
|
str_list2 = string_split(info->label, ";");
|
2015-10-26 05:55:42 +00:00
|
|
|
|
|
|
|
for (i = 0; i < str_list->size; i++)
|
|
|
|
{
|
2015-10-31 15:07:52 +00:00
|
|
|
char path_base[PATH_MAX_LENGTH] = {0};
|
|
|
|
char core_path[PATH_MAX_LENGTH] = {0};
|
|
|
|
const char *path = path_basename(str_list->elems[i].data);
|
2015-10-31 15:27:48 +00:00
|
|
|
|
|
|
|
if (!menu_playlist_find_associated_core(path, core_path, sizeof(core_path)))
|
|
|
|
strlcpy(core_path, "DETECT", sizeof(core_path));
|
2015-10-26 05:55:42 +00:00
|
|
|
|
|
|
|
strlcpy(path_base, path, sizeof(path_base));
|
|
|
|
|
2015-10-31 12:29:27 +00:00
|
|
|
strlcat(new_playlist_names, path_base, sizeof(new_playlist_names));
|
|
|
|
strlcat(new_playlist_names, ";", sizeof(new_playlist_names));
|
|
|
|
|
2015-10-31 15:07:52 +00:00
|
|
|
strlcat(new_playlist_cores, core_path, sizeof(new_playlist_cores));
|
|
|
|
strlcat(new_playlist_cores, ";", sizeof(new_playlist_cores));
|
|
|
|
|
2015-10-26 05:55:42 +00:00
|
|
|
path_remove_extension(path_base);
|
|
|
|
menu_entries_push(info->list,
|
|
|
|
path_base,
|
2015-10-26 06:16:37 +00:00
|
|
|
str_list->elems[i].data, MENU_SETTINGS_PLAYLIST_ASSOCIATION_START + i, 0, 0);
|
2015-10-31 15:07:52 +00:00
|
|
|
|
2015-10-26 05:55:42 +00:00
|
|
|
}
|
2015-10-31 12:29:27 +00:00
|
|
|
|
|
|
|
strlcpy(settings->playlist_names, new_playlist_names, sizeof(settings->playlist_names));
|
2015-10-31 15:07:52 +00:00
|
|
|
strlcpy(settings->playlist_cores, new_playlist_cores, sizeof(settings->playlist_cores));
|
2015-10-31 12:29:27 +00:00
|
|
|
string_list_free(str_list2);
|
2015-10-26 05:55:42 +00:00
|
|
|
}
|
|
|
|
}
|
2015-10-25 09:25:07 +00:00
|
|
|
info->need_push = true;
|
2015-10-25 08:38:53 +00:00
|
|
|
break;
|
2015-10-25 09:41:53 +00:00
|
|
|
case DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST:
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
|
|
|
|
for (i = 0; i < RARCH_BIND_LIST_END; i++)
|
|
|
|
{
|
|
|
|
const struct input_bind_map* keybind = (const struct input_bind_map*)
|
|
|
|
&input_config_bind_map[i];
|
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
|
|
|
keybind->base, PARSE_ONLY_BIND, false);
|
|
|
|
(void)ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
info->need_push = true;
|
|
|
|
break;
|
2015-10-24 08:31:11 +00:00
|
|
|
case DISPLAYLIST_INPUT_SETTINGS_LIST:
|
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_MAX_USERS), PARSE_ONLY_UINT, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:53:29 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_BACK_AS_MENU_TOGGLE_ENABLE), PARSE_ONLY_BOOL, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
#endif
|
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_MENU_TOGGLE_GAMEPAD_COMBO), PARSE_ONLY_UINT, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_REMAP_BINDS_ENABLE), PARSE_ONLY_BOOL, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_AUTODETECT_ENABLE), PARSE_ONLY_BOOL, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW), PARSE_ONLY_BOOL, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND), PARSE_ONLY_BOOL, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_AXIS_THRESHOLD), PARSE_ONLY_FLOAT, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_TURBO_PERIOD), PARSE_ONLY_UINT, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_DUTY_CYCLE), PARSE_ONLY_UINT, false);
|
2015-10-30 13:36:04 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_BIND_MODE), PARSE_ONLY_UINT, false);
|
2015-10-25 09:41:53 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_HOTKEY_BINDS), PARSE_ACTION, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
unsigned user;
|
|
|
|
for (user = 0; user < settings->input.max_users; user++)
|
|
|
|
{
|
|
|
|
char binds_list[PATH_MAX_LENGTH];
|
|
|
|
snprintf(binds_list, sizeof(binds_list), "%d_input_binds_list", user + 1);
|
|
|
|
menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
binds_list, PARSE_ACTION, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
|
|
|
break;
|
2015-09-06 17:49:51 +00:00
|
|
|
case DISPLAYLIST_SETTINGS_ALL:
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DRIVER_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_SETTINGS), PARSE_ACTION, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_HOTKEY_BINDS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CONFIGURATION_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVING_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOGGING_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_FRAME_THROTTLE_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REWIND_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORDING_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UI_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-10-19 23:40:33 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_UPDATER_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETWORK_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-25 09:25:07 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_PLAYLIST_SETTINGS), PARSE_ACTION, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_USER_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DIRECTORY_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-11-02 02:20:55 +00:00
|
|
|
ret = menu_displaylist_parse_settings(menu, info,
|
2015-10-24 08:52:12 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_PRIVACY_SETTINGS), PARSE_ONLY_GROUP, false);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_HORIZONTAL:
|
|
|
|
ret = menu_displaylist_parse_horizontal_list(info);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_sort = true;
|
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-06-22 20:10:14 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS:
|
2015-07-23 17:44:59 +00:00
|
|
|
ret = menu_displaylist_parse_horizontal_content_actions(info);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-07-23 17:44:59 +00:00
|
|
|
break;
|
2015-06-22 20:10:14 +00:00
|
|
|
case DISPLAYLIST_CONTENT_SETTINGS:
|
|
|
|
ret = menu_displaylist_parse_load_content_settings(info);
|
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-06-22 06:46:42 +00:00
|
|
|
break;
|
2015-06-24 02:56:44 +00:00
|
|
|
case DISPLAYLIST_INFORMATION_LIST:
|
|
|
|
ret = menu_displaylist_parse_information_list(info);
|
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-07-03 23:51:41 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_ADD_CONTENT_LIST:
|
|
|
|
ret = menu_displaylist_parse_add_content_list(info);
|
|
|
|
|
2015-10-24 17:37:59 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_SCAN_DIRECTORY_LIST:
|
|
|
|
ret = menu_displaylist_parse_scan_directory_list(info);
|
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-06-24 02:56:44 +00:00
|
|
|
break;
|
2015-06-22 06:46:42 +00:00
|
|
|
case DISPLAYLIST_LOAD_CONTENT_LIST:
|
2015-10-30 17:32:17 +00:00
|
|
|
menu_entries_push(info->list,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOAD_CONTENT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_CONTENT),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
|
|
|
|
if (core_info_list_num_info_files(global->core_info.list))
|
|
|
|
{
|
|
|
|
menu_entries_push(info->list,
|
|
|
|
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_entries_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
|
|
|
|
menu_entries_push(info->list,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CONTENT_COLLECTION_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CONTENT_COLLECTION_LIST),
|
|
|
|
MENU_SETTING_ACTION, 0, 0);
|
|
|
|
#endif
|
2015-06-22 06:46:42 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_OPTIONS:
|
|
|
|
ret = menu_displaylist_parse_options(info);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_OPTIONS_CHEATS:
|
|
|
|
ret = menu_displaylist_parse_options_cheats(info);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_OPTIONS_REMAPPINGS:
|
|
|
|
ret = menu_displaylist_parse_options_remappings(info);
|
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_SHADER_PARAMETERS:
|
|
|
|
case DISPLAYLIST_SHADER_PARAMETERS_PRESET:
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
2015-10-19 23:54:04 +00:00
|
|
|
if (shader)
|
|
|
|
ret = deferred_push_video_shader_parameters_common(info, shader,
|
|
|
|
(type == DISPLAYLIST_SHADER_PARAMETERS)
|
|
|
|
? MENU_SETTINGS_SHADER_PARAMETER_0 : MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
|
|
|
);
|
|
|
|
else
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-10-19 23:54:04 +00:00
|
|
|
menu_entries_push(info->list,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_SHADER_PARAMETERS),
|
|
|
|
"", 0, 0, 0);
|
|
|
|
ret = 0;
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-10-19 23:54:04 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_PERFCOUNTERS_CORE:
|
|
|
|
case DISPLAYLIST_PERFCOUNTERS_FRONTEND:
|
2015-06-06 20:51:28 +00:00
|
|
|
menu_displaylist_push_perfcounter(info,
|
2015-06-06 19:55:35 +00:00
|
|
|
(type == DISPLAYLIST_PERFCOUNTERS_CORE) ?
|
2015-10-11 16:21:07 +00:00
|
|
|
retro_get_perf_counter_libretro() : retro_get_perf_counter_rarch(),
|
2015-06-06 19:55:35 +00:00
|
|
|
(type == DISPLAYLIST_PERFCOUNTERS_CORE) ?
|
2015-10-11 16:21:07 +00:00
|
|
|
retro_get_perf_count_libretro() : retro_get_perf_count_rarch(),
|
2015-06-06 19:55:35 +00:00
|
|
|
(type == DISPLAYLIST_PERFCOUNTERS_CORE) ?
|
2015-07-21 02:01:11 +00:00
|
|
|
MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN :
|
2015-06-18 06:39:34 +00:00
|
|
|
MENU_SETTINGS_PERF_COUNTERS_BEGIN);
|
2015-06-06 20:51:28 +00:00
|
|
|
ret = 0;
|
2015-06-06 19:55:35 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = false;
|
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_DATABASE_ENTRY:
|
2015-09-06 17:29:04 +00:00
|
|
|
{
|
2015-10-03 00:45:40 +00:00
|
|
|
struct string_list *str_list = string_split(info->label, "|");
|
2015-09-06 17:29:04 +00:00
|
|
|
|
|
|
|
if (!str_list)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
strlcpy(info->path_b, str_list->elems[1].data, sizeof(info->path_b));
|
|
|
|
strlcpy(info->label, str_list->elems[0].data, sizeof(info->label));
|
|
|
|
|
|
|
|
string_list_free(str_list);
|
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
ret = menu_displaylist_parse_database_entry(info);
|
2015-05-13 11:45:53 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_DATABASE_QUERY:
|
2015-06-18 06:39:34 +00:00
|
|
|
ret = menu_database_parse_query(info->list,
|
|
|
|
info->path, (info->path_c[0] == '\0') ? NULL : info->path_c);
|
2015-05-19 04:32:49 +00:00
|
|
|
strlcpy(info->path, info->path_b, sizeof(info->path));
|
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_sort = true;
|
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_OPTIONS_SHADERS:
|
|
|
|
ret = menu_displaylist_parse_shader_options(info);
|
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
2015-07-04 01:37:43 +00:00
|
|
|
case DISPLAYLIST_CORE_CONTENT:
|
|
|
|
#ifdef HAVE_NETWORKING
|
2015-07-04 02:01:35 +00:00
|
|
|
print_buf_lines(info->list, core_buf, core_len, MENU_FILE_DOWNLOAD_CORE_CONTENT);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-07-04 01:37:43 +00:00
|
|
|
#endif
|
|
|
|
break;
|
2015-05-19 04:32:49 +00:00
|
|
|
case DISPLAYLIST_CORES_UPDATER:
|
|
|
|
#ifdef HAVE_NETWORKING
|
|
|
|
print_buf_lines(info->list, core_buf, core_len, MENU_FILE_DOWNLOAD_CORE);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
#endif
|
|
|
|
break;
|
2015-05-21 22:28:02 +00:00
|
|
|
case DISPLAYLIST_PLAYLIST_COLLECTION:
|
2015-10-19 04:05:52 +00:00
|
|
|
if (!strcmp(info->path, "content_history.lpl"))
|
|
|
|
{
|
2015-10-21 23:38:41 +00:00
|
|
|
if (menu_displaylist_push_list(info, DISPLAYLIST_HISTORY) == 0)
|
|
|
|
menu_displaylist_push_list_process(info);
|
2015-10-19 04:05:52 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-09-08 17:33:31 +00:00
|
|
|
else
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-08-17 20:32:42 +00:00
|
|
|
char path_playlist[PATH_MAX_LENGTH];
|
2015-06-12 14:36:15 +00:00
|
|
|
content_playlist_t *playlist = NULL;
|
2015-05-22 00:34:05 +00:00
|
|
|
|
2015-06-08 20:09:56 +00:00
|
|
|
if (menu->playlist)
|
|
|
|
content_playlist_free(menu->playlist);
|
|
|
|
|
|
|
|
fill_pathname_join(path_playlist,
|
|
|
|
settings->playlist_directory, info->path,
|
|
|
|
sizeof(path_playlist));
|
|
|
|
menu->playlist = content_playlist_init(path_playlist,
|
2015-07-25 22:40:24 +00:00
|
|
|
COLLECTION_SIZE);
|
2015-06-08 20:09:56 +00:00
|
|
|
strlcpy(menu->db_playlist_file, path_playlist, sizeof(menu->db_playlist_file));
|
2015-06-19 19:50:13 +00:00
|
|
|
strlcpy(path_playlist,
|
|
|
|
menu_hash_to_str(MENU_LABEL_COLLECTION), sizeof(path_playlist));
|
2015-06-08 20:09:56 +00:00
|
|
|
playlist = menu->playlist;
|
|
|
|
|
2015-06-09 00:49:06 +00:00
|
|
|
ret = menu_displaylist_parse_playlist(info, playlist, path_playlist, false);
|
2015-06-08 20:09:56 +00:00
|
|
|
|
|
|
|
if (ret == 0)
|
2015-05-21 22:28:02 +00:00
|
|
|
{
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_sort = true;
|
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-05-21 22:28:02 +00:00
|
|
|
}
|
2015-06-08 20:09:56 +00:00
|
|
|
}
|
2015-10-19 04:05:52 +00:00
|
|
|
break;
|
2015-06-08 20:09:56 +00:00
|
|
|
case DISPLAYLIST_HISTORY:
|
|
|
|
{
|
2015-08-17 20:32:42 +00:00
|
|
|
char path_playlist[PATH_MAX_LENGTH];
|
2015-06-12 14:36:15 +00:00
|
|
|
content_playlist_t *playlist = g_defaults.history;
|
|
|
|
|
2015-10-24 04:36:13 +00:00
|
|
|
if (!playlist)
|
|
|
|
event_command(EVENT_CMD_HISTORY_INIT);
|
|
|
|
|
2015-06-08 20:09:56 +00:00
|
|
|
strlcpy(path_playlist, "history", sizeof(path_playlist));
|
2015-05-21 22:28:02 +00:00
|
|
|
|
2015-06-09 00:49:06 +00:00
|
|
|
ret = menu_displaylist_parse_playlist(info, playlist, path_playlist, true);
|
2015-05-22 00:51:45 +00:00
|
|
|
|
|
|
|
if (ret == 0)
|
2015-05-21 22:28:02 +00:00
|
|
|
{
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-05-21 22:28:02 +00:00
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_OPTIONS_DISK:
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 07:45:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DISK_INDEX),
|
|
|
|
menu_hash_to_str(MENU_LABEL_DISK_INDEX),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 07:45:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_DISK_CYCLE_TRAY_STATUS),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 07:45:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DISK_IMAGE_APPEND),
|
|
|
|
menu_hash_to_str(MENU_LABEL_DISK_IMAGE_APPEND),
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_SYSTEM_INFO:
|
|
|
|
menu_displaylist_parse_system_info(info);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
2015-09-24 01:48:08 +00:00
|
|
|
case DISPLAYLIST_DEBUG_INFO:
|
|
|
|
menu_displaylist_parse_debug_info(info);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-11-08 02:58:50 +00:00
|
|
|
break;
|
2015-11-08 15:19:54 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_CHEEVOS
|
2015-11-08 02:58:50 +00:00
|
|
|
case DISPLAYLIST_ACHIEVEMENT_LIST:
|
2015-11-08 15:19:54 +00:00
|
|
|
cheevos_populate_menu(info);
|
2015-11-08 02:58:50 +00:00
|
|
|
info->need_push = true;
|
|
|
|
info->need_refresh = true;
|
2015-09-24 01:48:08 +00:00
|
|
|
break;
|
2015-11-08 15:19:54 +00:00
|
|
|
#endif
|
|
|
|
|
2015-06-07 17:46:03 +00:00
|
|
|
case DISPLAYLIST_CORES_SUPPORTED:
|
2015-06-07 21:26:29 +00:00
|
|
|
case DISPLAYLIST_CORES_COLLECTION_SUPPORTED:
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_sort = true;
|
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
|
|
|
|
{
|
2015-10-26 20:03:28 +00:00
|
|
|
unsigned cores_names_len;
|
|
|
|
size_t cores_names_size;
|
|
|
|
unsigned cores_paths_len;
|
|
|
|
size_t cores_paths_size;
|
|
|
|
struct string_list *cores_names = string_list_new_special(STRING_LIST_SUPPORTED_CORES_NAMES,
|
|
|
|
(void*)menu->deferred_path, &cores_names_len, &cores_names_size);
|
|
|
|
struct string_list *cores_paths = string_list_new_special(STRING_LIST_SUPPORTED_CORES_PATHS,
|
|
|
|
(void*)menu->deferred_path, &cores_paths_len, &cores_paths_size);
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-10-26 20:03:28 +00:00
|
|
|
if (cores_names_size == 0)
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 06:39:34 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_CORES_AVAILABLE),
|
|
|
|
"",
|
2015-06-10 20:43:06 +00:00
|
|
|
0, 0, 0);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
2015-06-22 03:39:04 +00:00
|
|
|
else
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-10-26 20:03:28 +00:00
|
|
|
for (i = 0; i < cores_names_size; i++)
|
2015-06-22 03:39:04 +00:00
|
|
|
{
|
|
|
|
if (type == DISPLAYLIST_CORES_COLLECTION_SUPPORTED)
|
2015-10-26 20:03:28 +00:00
|
|
|
menu_entries_push(info->list, cores_paths->elems[i].data, "",
|
2015-06-22 03:39:04 +00:00
|
|
|
MENU_FILE_CORE, 0, 0);
|
|
|
|
else
|
2015-10-26 20:03:28 +00:00
|
|
|
menu_entries_push(info->list, cores_paths->elems[i].data,
|
2015-06-22 03:39:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_DETECT_CORE_LIST_OK),
|
|
|
|
MENU_FILE_CORE, 0, 0);
|
2015-10-19 15:12:03 +00:00
|
|
|
menu_entries_set_alt_at_offset(info->list, i,
|
2015-10-26 20:03:28 +00:00
|
|
|
cores_names->elems[i].data);
|
2015-06-22 03:39:04 +00:00
|
|
|
}
|
2015-10-26 20:03:28 +00:00
|
|
|
|
|
|
|
string_list_free(cores_names);
|
|
|
|
string_list_free(cores_paths);
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_CORE_INFO:
|
|
|
|
menu_displaylist_parse_core_info(info);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_CORE_OPTIONS:
|
2015-06-25 10:50:45 +00:00
|
|
|
if (system && system->core_options)
|
2015-05-19 04:32:49 +00:00
|
|
|
{
|
2015-06-25 10:50:45 +00:00
|
|
|
size_t opts = core_option_size(system->core_options);
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-06-28 15:22:53 +00:00
|
|
|
if (opts == 0)
|
|
|
|
{
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-28 15:22:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_CORE_OPTIONS_AVAILABLE), "",
|
|
|
|
MENU_SETTINGS_CORE_OPTION_NONE, 0, 0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for (i = 0; i < opts; i++)
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-28 15:22:53 +00:00
|
|
|
core_option_get_desc(system->core_options, i), "",
|
|
|
|
MENU_SETTINGS_CORE_OPTION_START + i, 0, 0);
|
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
}
|
|
|
|
else
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-06-18 06:39:34 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_CORE_OPTIONS_AVAILABLE), "",
|
2015-06-10 20:43:06 +00:00
|
|
|
MENU_SETTINGS_CORE_OPTION_NONE, 0, 0);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
2015-09-06 17:29:04 +00:00
|
|
|
case DISPLAYLIST_DATABASES:
|
|
|
|
info->type_default = MENU_FILE_RDB;
|
|
|
|
strlcpy(info->exts, "rdb", sizeof(info->exts));
|
|
|
|
strlcpy(info->path, settings->content_database, sizeof(info->path));
|
|
|
|
break;
|
2015-09-06 17:31:43 +00:00
|
|
|
case DISPLAYLIST_ARCHIVE_ACTION:
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-09-06 17:31:43 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OPEN_ARCHIVE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_OPEN_ARCHIVE),
|
|
|
|
0, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-09-06 17:31:43 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOAD_ARCHIVE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_ARCHIVE),
|
|
|
|
0, 0, 0);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-09-06 17:31:43 +00:00
|
|
|
break;
|
|
|
|
case DISPLAYLIST_ARCHIVE_ACTION_DETECT_CORE:
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-09-06 17:31:43 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OPEN_ARCHIVE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_OPEN_ARCHIVE_DETECT_CORE),
|
|
|
|
0, 0, 0);
|
2015-10-17 15:10:29 +00:00
|
|
|
menu_entries_push(info->list,
|
2015-09-06 17:31:43 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOAD_ARCHIVE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_ARCHIVE_DETECT_CORE),
|
|
|
|
0, 0, 0);
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_push = true;
|
2015-09-06 17:31:43 +00:00
|
|
|
break;
|
2015-09-06 17:49:51 +00:00
|
|
|
case DISPLAYLIST_DATABASE_CURSORS:
|
|
|
|
info->type_default = MENU_FILE_CURSOR;
|
|
|
|
strlcpy(info->exts, "dbc", sizeof(info->exts));
|
|
|
|
strlcpy(info->path, settings->cursor_directory, sizeof(info->path));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_DATABASE_PLAYLISTS:
|
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
|
|
|
strlcpy(info->exts, "lpl", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_CORES:
|
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
|
|
|
strlcpy(info->exts, EXT_EXECUTABLES, sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_CONFIG_FILES:
|
|
|
|
info->type_default = MENU_FILE_CONFIG;
|
|
|
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_SHADER_PRESET:
|
|
|
|
info->type_default = MENU_FILE_SHADER_PRESET;
|
|
|
|
strlcpy(info->exts, "cgp|glslp", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_SHADER_PASS:
|
|
|
|
info->type_default = MENU_FILE_SHADER;
|
|
|
|
strlcpy(info->exts, "cg|glsl", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_VIDEO_FILTERS:
|
|
|
|
info->type_default = MENU_FILE_VIDEOFILTER;
|
|
|
|
strlcpy(info->exts, "filt", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_IMAGES:
|
|
|
|
info->type_default = MENU_FILE_IMAGE;
|
|
|
|
strlcpy(info->exts, "png", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_AUDIO_FILTERS:
|
|
|
|
info->type_default = MENU_FILE_AUDIOFILTER;
|
|
|
|
strlcpy(info->exts, "dsp", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_CHEAT_FILES:
|
|
|
|
info->type_default = MENU_FILE_CHEAT;
|
|
|
|
strlcpy(info->exts, "cht", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_CONTENT_HISTORY:
|
|
|
|
info->type_default = MENU_FILE_PLAIN;
|
|
|
|
strlcpy(info->exts, "lpl", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_FONTS:
|
|
|
|
info->type_default = MENU_FILE_FONT;
|
|
|
|
strlcpy(info->exts, "ttf", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_OVERLAYS:
|
|
|
|
info->type_default = MENU_FILE_OVERLAY;
|
|
|
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_RECORD_CONFIG_FILES:
|
|
|
|
info->type_default = MENU_FILE_RECORD_CONFIG;
|
|
|
|
strlcpy(info->exts, "cfg", sizeof(info->exts));
|
|
|
|
break;
|
|
|
|
case DISPLAYLIST_REMAP_FILES:
|
|
|
|
info->type_default = MENU_FILE_REMAP;
|
|
|
|
strlcpy(info->exts, "rmp", sizeof(info->exts));
|
2015-05-19 04:32:49 +00:00
|
|
|
break;
|
2015-05-18 19:02:03 +00:00
|
|
|
}
|
2015-05-19 04:32:49 +00:00
|
|
|
|
2015-10-19 04:38:36 +00:00
|
|
|
switch (type)
|
2015-10-19 04:36:44 +00:00
|
|
|
{
|
2015-10-19 04:38:36 +00:00
|
|
|
case DISPLAYLIST_DATABASES:
|
|
|
|
case DISPLAYLIST_DEFAULT:
|
|
|
|
case DISPLAYLIST_CORES:
|
|
|
|
case DISPLAYLIST_CORES_DETECTED:
|
|
|
|
case DISPLAYLIST_SHADER_PASS:
|
|
|
|
case DISPLAYLIST_SHADER_PRESET:
|
|
|
|
case DISPLAYLIST_DATABASE_CURSORS:
|
|
|
|
case DISPLAYLIST_DATABASE_PLAYLISTS:
|
|
|
|
case DISPLAYLIST_VIDEO_FILTERS:
|
|
|
|
case DISPLAYLIST_AUDIO_FILTERS:
|
|
|
|
case DISPLAYLIST_IMAGES:
|
|
|
|
case DISPLAYLIST_OVERLAYS:
|
|
|
|
case DISPLAYLIST_FONTS:
|
|
|
|
case DISPLAYLIST_CHEAT_FILES:
|
|
|
|
case DISPLAYLIST_REMAP_FILES:
|
|
|
|
case DISPLAYLIST_RECORD_CONFIG_FILES:
|
|
|
|
case DISPLAYLIST_CONFIG_FILES:
|
|
|
|
case DISPLAYLIST_CONTENT_HISTORY:
|
|
|
|
case DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL:
|
|
|
|
{
|
2015-10-19 15:10:35 +00:00
|
|
|
bool horizontal = (type == DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL);
|
2015-10-28 20:30:30 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
if (menu_displaylist_parse_generic(info, horizontal) == 0)
|
2015-10-19 15:10:35 +00:00
|
|
|
{
|
2015-10-21 23:23:22 +00:00
|
|
|
info->need_refresh = true;
|
|
|
|
info->need_push = true;
|
2015-10-19 15:10:35 +00:00
|
|
|
}
|
2015-10-19 04:38:36 +00:00
|
|
|
}
|
|
|
|
break;
|
2015-10-19 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
2015-10-21 23:38:41 +00:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void menu_displaylist_push_list_process(menu_displaylist_info_t *info)
|
|
|
|
{
|
|
|
|
if (!info)
|
|
|
|
return;
|
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
if (info->need_sort)
|
2015-05-13 14:49:11 +00:00
|
|
|
file_list_sort_on_alt(info->list);
|
2015-10-21 23:38:41 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
if (info->need_refresh)
|
2015-10-18 19:58:13 +00:00
|
|
|
menu_entries_refresh(info->list);
|
2015-05-12 14:36:41 +00:00
|
|
|
|
2015-10-21 23:23:22 +00:00
|
|
|
if (info->need_push)
|
2015-05-13 13:08:11 +00:00
|
|
|
{
|
2015-10-19 04:01:29 +00:00
|
|
|
const menu_ctx_driver_t *menu_driver = menu_ctx_driver_get_ptr();
|
2015-05-13 13:08:11 +00:00
|
|
|
driver_t *driver = driver_get_ptr();
|
|
|
|
const ui_companion_driver_t *ui = ui_companion_get_ptr();
|
|
|
|
|
2015-10-19 04:01:29 +00:00
|
|
|
if (menu_driver->populate_entries)
|
|
|
|
menu_driver->populate_entries(info->path, info->label, info->type);
|
2015-05-12 14:12:50 +00:00
|
|
|
|
2015-05-13 13:08:11 +00:00
|
|
|
if (ui && driver)
|
|
|
|
ui->notify_list_loaded(driver->ui_companion_data,
|
|
|
|
info->list, info->menu_list);
|
|
|
|
}
|
2015-05-12 08:45:37 +00:00
|
|
|
}
|
|
|
|
|
2015-10-31 15:27:48 +00:00
|
|
|
|
2015-05-11 09:11:23 +00:00
|
|
|
int menu_displaylist_push(file_list_t *list, file_list_t *menu_list)
|
|
|
|
{
|
2015-06-06 20:00:34 +00:00
|
|
|
menu_file_list_cbs_t *cbs = NULL;
|
2015-05-13 13:15:52 +00:00
|
|
|
const char *path = NULL;
|
|
|
|
const char *label = NULL;
|
2015-06-06 20:00:34 +00:00
|
|
|
uint32_t hash_label = 0;
|
2015-06-14 02:01:21 +00:00
|
|
|
unsigned type = 0;
|
|
|
|
menu_displaylist_info_t info = {0};
|
2015-10-28 20:30:30 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-05-12 08:28:29 +00:00
|
|
|
|
2015-10-17 16:45:14 +00:00
|
|
|
menu_entries_get_last_stack(&path, &label, &type, NULL);
|
2015-05-13 11:54:14 +00:00
|
|
|
|
2015-05-12 08:28:29 +00:00
|
|
|
info.list = list;
|
|
|
|
info.menu_list = menu_list;
|
2015-05-13 11:54:14 +00:00
|
|
|
info.type = type;
|
|
|
|
strlcpy(info.path, path, sizeof(info.path));
|
|
|
|
strlcpy(info.label, label, sizeof(info.label));
|
2015-05-21 02:11:20 +00:00
|
|
|
|
2015-06-17 17:55:24 +00:00
|
|
|
hash_label = menu_hash_calculate(label);
|
2015-06-06 20:00:34 +00:00
|
|
|
|
|
|
|
if (!info.list)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
switch (hash_label)
|
|
|
|
{
|
|
|
|
case MENU_VALUE_MAIN_MENU:
|
2015-10-21 23:38:41 +00:00
|
|
|
if (menu_displaylist_push_list(&info, DISPLAYLIST_MAIN_MENU) != 0)
|
|
|
|
return -1;
|
|
|
|
menu_displaylist_push_list_process(&info);
|
|
|
|
return 0;
|
2015-10-20 12:11:43 +00:00
|
|
|
case MENU_VALUE_SETTINGS_TAB:
|
2015-10-21 23:38:41 +00:00
|
|
|
if (menu_displaylist_push_list(&info, DISPLAYLIST_SETTINGS_ALL) != 0)
|
|
|
|
return -1;
|
|
|
|
menu_displaylist_push_list_process(&info);
|
|
|
|
return 0;
|
2015-10-22 18:05:51 +00:00
|
|
|
case MENU_VALUE_HISTORY_TAB:
|
|
|
|
if (menu_displaylist_push_list(&info, DISPLAYLIST_HISTORY) != 0)
|
|
|
|
return -1;
|
|
|
|
menu_displaylist_push_list_process(&info);
|
|
|
|
return 0;
|
2015-10-24 17:37:59 +00:00
|
|
|
case MENU_VALUE_ADD_TAB:
|
|
|
|
if (menu_displaylist_push_list(&info, DISPLAYLIST_SCAN_DIRECTORY_LIST) != 0)
|
|
|
|
return -1;
|
|
|
|
menu_displaylist_push_list_process(&info);
|
|
|
|
return 0;
|
2015-10-28 19:11:26 +00:00
|
|
|
case MENU_VALUE_PLAYLISTS_TAB:
|
2015-10-28 20:30:30 +00:00
|
|
|
info.type = 42;
|
|
|
|
strlcpy(info.exts, "lpl", sizeof(info.exts));
|
|
|
|
strlcpy(info.label, menu_hash_to_str(MENU_LABEL_CONTENT_COLLECTION_LIST),
|
|
|
|
sizeof(info.label));
|
|
|
|
|
|
|
|
if (settings->playlist_directory[0] != '\0')
|
|
|
|
{
|
|
|
|
strlcpy(info.path, settings->playlist_directory,
|
|
|
|
sizeof(info.path));
|
|
|
|
if (menu_displaylist_push_list(&info, DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL) != 0)
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
menu_entries_clear(info.list);
|
|
|
|
menu_entries_push(info.list,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
|
|
|
MENU_INFO_MESSAGE, 0, 0);
|
|
|
|
info.need_refresh = true;
|
|
|
|
info.need_push = true;
|
|
|
|
}
|
2015-10-28 19:11:26 +00:00
|
|
|
menu_displaylist_push_list_process(&info);
|
|
|
|
return 0;
|
2015-06-06 20:00:34 +00:00
|
|
|
case MENU_VALUE_HORIZONTAL_MENU:
|
2015-10-21 23:38:41 +00:00
|
|
|
if (menu_displaylist_push_list(&info, DISPLAYLIST_HORIZONTAL) != 0)
|
|
|
|
return -1;
|
|
|
|
menu_displaylist_push_list_process(&info);
|
|
|
|
return 0;
|
2015-06-06 20:00:34 +00:00
|
|
|
}
|
|
|
|
|
2015-10-17 16:57:47 +00:00
|
|
|
cbs = menu_entries_get_last_stack_actiondata();
|
2015-06-06 20:00:34 +00:00
|
|
|
|
2015-10-17 16:57:47 +00:00
|
|
|
if (cbs && cbs->action_deferred_push)
|
2015-06-06 20:00:34 +00:00
|
|
|
return cbs->action_deferred_push(&info);
|
2015-06-05 15:56:51 +00:00
|
|
|
|
2015-06-06 20:00:34 +00:00
|
|
|
return 0;
|
2015-05-11 09:11:23 +00:00
|
|
|
}
|