2014-09-02 23:51:29 +00:00
|
|
|
#ifndef _DISP_SHARED_H
|
|
|
|
#define _DISP_SHARED_H
|
|
|
|
|
2014-10-28 18:54:23 +00:00
|
|
|
#include "../../settings_data.h"
|
2014-10-26 21:09:49 +00:00
|
|
|
|
2014-09-02 23:51:29 +00:00
|
|
|
static void get_title(const char *label, const char *dir,
|
2014-09-16 02:21:31 +00:00
|
|
|
unsigned menu_type, char *title, size_t sizeof_title)
|
2014-09-02 23:51:29 +00:00
|
|
|
{
|
|
|
|
if (!strcmp(label, "core_list"))
|
|
|
|
snprintf(title, sizeof_title, "CORE SELECTION %s", dir);
|
2014-12-21 22:41:17 +00:00
|
|
|
if (!strcmp(label, "core_manager_list"))
|
|
|
|
snprintf(title, sizeof_title, "CORE MANAGER %s", dir);
|
2014-09-03 22:25:19 +00:00
|
|
|
else if (!strcmp(label, "deferred_core_list"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "DETECTED CORES %s", dir);
|
2014-09-04 17:43:54 +00:00
|
|
|
else if (!strcmp(label, "configurations"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "CONFIG %s", dir);
|
2014-09-04 19:19:02 +00:00
|
|
|
else if (!strcmp(label, "disk_image_append"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "DISK APPEND %s", dir);
|
2014-09-04 17:02:42 +00:00
|
|
|
else if (!strcmp(label, "Video Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "VIDEO OPTIONS", sizeof_title);
|
2014-09-04 16:46:29 +00:00
|
|
|
else if (!strcmp(label, "Input Options") ||
|
2014-09-02 23:51:29 +00:00
|
|
|
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
|
|
|
menu_type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD)
|
|
|
|
strlcpy(title, "INPUT OPTIONS", sizeof_title);
|
2014-09-04 16:12:14 +00:00
|
|
|
else if (!strcmp(label, "Overlay Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "OVERLAY OPTIONS", sizeof_title);
|
2014-10-17 02:27:12 +00:00
|
|
|
else if (!strcmp(label, "Playlist Options"))
|
|
|
|
strlcpy(title, "PLAYLIST OPTIONS", sizeof_title);
|
2014-12-20 21:44:06 +00:00
|
|
|
else if (!strcmp(label, "Network Options"))
|
|
|
|
strlcpy(title, "NETWORK OPTIONS", sizeof_title);
|
2014-09-03 23:00:11 +00:00
|
|
|
else if (!strcmp(label, "User Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "USER OPTIONS", sizeof_title);
|
2014-09-04 17:24:27 +00:00
|
|
|
else if (!strcmp(label, "Path Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "PATH OPTIONS", sizeof_title);
|
2014-09-04 17:20:14 +00:00
|
|
|
else if (!strcmp(label, "settings"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "SETTINGS", sizeof_title);
|
2014-09-04 16:50:03 +00:00
|
|
|
else if (!strcmp(label, "Driver Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "DRIVER OPTIONS", sizeof_title);
|
2014-09-03 20:04:46 +00:00
|
|
|
else if (!strcmp(label, "performance_counters"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "PERFORMANCE COUNTERS", sizeof_title);
|
2014-09-04 03:27:47 +00:00
|
|
|
else if (!strcmp(label, "frontend_counters"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "FRONTEND PERFORMANCE COUNTERS", sizeof_title);
|
2014-09-04 03:27:47 +00:00
|
|
|
else if (!strcmp(label, "core_counters"))
|
|
|
|
strlcpy(title, "CORE PERFORMANCE COUNTERS", sizeof_title);
|
2014-09-04 17:34:28 +00:00
|
|
|
else if (!strcmp(label, "Shader Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "SHADER OPTIONS", sizeof_title);
|
2014-11-14 13:54:20 +00:00
|
|
|
else if (!strcmp(label, "Archive Options"))
|
|
|
|
strlcpy(title, "ARCHIVE OPTIONS", sizeof_title);
|
2014-09-04 21:54:38 +00:00
|
|
|
else if (!strcmp(label, "video_shader_parameters"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "SHADER PARAMETERS (CURRENT)", sizeof_title);
|
2014-09-04 21:54:38 +00:00
|
|
|
else if (!strcmp(label, "video_shader_preset_parameters"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "SHADER PARAMETERS (MENU PRESET)", sizeof_title);
|
2014-09-04 17:05:03 +00:00
|
|
|
else if (!strcmp(label, "Font Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "FONT OPTIONS", sizeof_title);
|
2014-09-04 17:06:30 +00:00
|
|
|
else if (!strcmp(label, "General Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "GENERAL OPTIONS", sizeof_title);
|
2014-09-04 16:37:31 +00:00
|
|
|
else if (!strcmp(label, "Audio Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "AUDIO OPTIONS", sizeof_title);
|
2014-09-04 19:11:53 +00:00
|
|
|
else if (!strcmp(label, "disk_options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "DISK OPTIONS", sizeof_title);
|
2014-09-04 16:15:58 +00:00
|
|
|
else if (!strcmp(label, "core_options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "CORE OPTIONS", sizeof_title);
|
2014-12-06 14:47:25 +00:00
|
|
|
else if (!strcmp(label, "core_cheat_options"))
|
|
|
|
strlcpy(title, "CORE CHEAT OPTIONS", sizeof_title);
|
2014-09-02 23:51:29 +00:00
|
|
|
else if (!strcmp(label, "core_information"))
|
|
|
|
strlcpy(title, "CORE INFO", sizeof_title);
|
2014-09-04 16:09:25 +00:00
|
|
|
else if (!strcmp(label, "Privacy Options"))
|
2014-09-02 23:51:29 +00:00
|
|
|
strlcpy(title, "PRIVACY OPTIONS", sizeof_title);
|
2014-09-03 00:22:32 +00:00
|
|
|
else if (!strcmp(label, "video_shader_pass"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "SHADER %s", dir);
|
2014-09-03 00:22:32 +00:00
|
|
|
else if (!strcmp(label, "video_shader_preset"))
|
|
|
|
snprintf(title, sizeof_title, "SHADER PRESET %s", dir);
|
2014-12-15 22:51:11 +00:00
|
|
|
else if (!strcmp(label, "cheat_file_load"))
|
|
|
|
snprintf(title, sizeof_title, "CHEAT FILE %s", dir);
|
2014-09-04 17:24:27 +00:00
|
|
|
else if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
2014-09-02 23:51:29 +00:00
|
|
|
!strcmp(label, "custom_viewport_2") ||
|
|
|
|
!strcmp(label, "help") ||
|
|
|
|
menu_type == MENU_SETTINGS)
|
|
|
|
snprintf(title, sizeof_title, "MENU %s", dir);
|
|
|
|
else if (!strcmp(label, "history_list"))
|
|
|
|
strlcpy(title, "LOAD HISTORY", sizeof_title);
|
|
|
|
else if (!strcmp(label, "info_screen"))
|
|
|
|
strlcpy(title, "INFO", sizeof_title);
|
2014-09-04 03:31:54 +00:00
|
|
|
else if (!strcmp(label, "input_overlay"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "OVERLAY %s", dir);
|
2014-09-11 03:48:35 +00:00
|
|
|
else if (!strcmp(label, "video_font_path"))
|
|
|
|
snprintf(title, sizeof_title, "FONT %s", dir);
|
2014-09-03 01:34:14 +00:00
|
|
|
else if (!strcmp(label, "video_filter"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "FILTER %s", dir);
|
2014-09-03 01:34:14 +00:00
|
|
|
else if (!strcmp(label, "audio_dsp_plugin"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "DSP FILTER %s", dir);
|
|
|
|
else if (!strcmp(label, "rgui_browser_directory"))
|
|
|
|
snprintf(title, sizeof_title, "BROWSER DIR %s", dir);
|
2014-09-15 02:12:27 +00:00
|
|
|
else if (!strcmp(label, "playlist_directory"))
|
|
|
|
snprintf(title, sizeof_title, "PLAYLIST DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "content_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "CONTENT DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "screenshot_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "SCREENSHOT DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "video_shader_dir"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "SHADER DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "video_filter_dir"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "FILTER DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "audio_filter_dir"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "DSP FILTER DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "savestate_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "SAVESTATE DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "libretro_dir_path"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "LIBRETRO DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "libretro_info_path"))
|
|
|
|
snprintf(title, sizeof_title, "LIBRETRO INFO DIR %s", dir);
|
|
|
|
else if (!strcmp(label, "rgui_config_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "CONFIG DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "savefile_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "SAVEFILE DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "overlay_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "OVERLAY DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "system_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "SYSTEM DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "assets_directory"))
|
2014-09-02 23:51:29 +00:00
|
|
|
snprintf(title, sizeof_title, "ASSETS DIR %s", dir);
|
2014-09-04 01:31:44 +00:00
|
|
|
else if (!strcmp(label, "extraction_directory"))
|
|
|
|
snprintf(title, sizeof_title, "EXTRACTION DIR %s", dir);
|
|
|
|
else if (!strcmp(label, "joypad_autoconfig_dir"))
|
|
|
|
snprintf(title, sizeof_title, "AUTOCONFIG DIR %s", dir);
|
2014-09-02 23:51:29 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if (driver.menu->defer_core)
|
|
|
|
snprintf(title, sizeof_title, "CONTENT %s", dir);
|
|
|
|
else
|
|
|
|
{
|
2014-09-07 05:12:10 +00:00
|
|
|
const char *core_name = g_extern.menu.info.library_name;
|
2014-09-02 23:51:29 +00:00
|
|
|
if (!core_name)
|
|
|
|
core_name = g_extern.system.info.library_name;
|
|
|
|
if (!core_name)
|
|
|
|
core_name = "No Core";
|
|
|
|
snprintf(title, sizeof_title, "CONTENT (%s) %s", core_name, dir);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-20 17:54:55 +00:00
|
|
|
static void disp_set_label(file_list_t* list,
|
|
|
|
unsigned *w, unsigned type, unsigned i,
|
2014-09-10 16:26:02 +00:00
|
|
|
const char *label,
|
|
|
|
char *type_str, size_t type_str_size,
|
|
|
|
const char *entry_label,
|
2014-09-10 23:57:25 +00:00
|
|
|
const char *path,
|
|
|
|
char *path_buf, size_t path_buf_size)
|
2014-09-10 16:26:02 +00:00
|
|
|
{
|
2014-10-13 02:33:48 +00:00
|
|
|
*type_str = '\0';
|
2014-09-10 16:26:02 +00:00
|
|
|
*w = 19;
|
|
|
|
|
|
|
|
if (!strcmp(label, "performance_counters"))
|
|
|
|
*w = 28;
|
|
|
|
|
2014-10-13 02:28:29 +00:00
|
|
|
if (!strcmp(label, "history_list"))
|
|
|
|
*w = 6;
|
|
|
|
|
2014-09-10 16:26:02 +00:00
|
|
|
if (type == MENU_FILE_CORE)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(CORE)", type_str_size);
|
2014-10-20 17:54:55 +00:00
|
|
|
menu_list_get_alt_at_offset(list, i, &path);
|
2014-09-10 16:26:02 +00:00
|
|
|
*w = 6;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_PLAIN)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(FILE)", type_str_size);
|
|
|
|
*w = 6;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_USE_DIRECTORY)
|
|
|
|
{
|
|
|
|
*type_str = '\0';
|
|
|
|
*w = 0;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_DIRECTORY)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(DIR)", type_str_size);
|
|
|
|
*w = 5;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_CARCHIVE)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(COMP)", type_str_size);
|
|
|
|
*w = 6;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_IN_CARCHIVE)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(CFILE)", type_str_size);
|
|
|
|
*w = 7;
|
|
|
|
}
|
2014-09-11 03:48:35 +00:00
|
|
|
else if (type == MENU_FILE_FONT)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(FONT)", type_str_size);
|
|
|
|
*w = 7;
|
|
|
|
}
|
2014-09-10 16:36:35 +00:00
|
|
|
else if (type == MENU_FILE_SHADER_PRESET)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(PRESET)", type_str_size);
|
|
|
|
*w = 8;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_SHADER)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(SHADER)", type_str_size);
|
|
|
|
*w = 8;
|
|
|
|
}
|
2014-09-10 18:59:16 +00:00
|
|
|
else if (
|
|
|
|
type == MENU_FILE_VIDEOFILTER ||
|
|
|
|
type == MENU_FILE_AUDIOFILTER)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(FILTER)", type_str_size);
|
|
|
|
*w = 8;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_CONFIG)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(CONFIG)", type_str_size);
|
|
|
|
*w = 8;
|
|
|
|
}
|
|
|
|
else if (type == MENU_FILE_OVERLAY)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "(OVERLAY)", type_str_size);
|
|
|
|
*w = 9;
|
|
|
|
}
|
2014-09-10 16:26:02 +00:00
|
|
|
else if (type >= MENU_SETTINGS_CORE_OPTION_START)
|
|
|
|
strlcpy(
|
|
|
|
type_str,
|
|
|
|
core_option_get_val(g_extern.system.core_options,
|
|
|
|
type - MENU_SETTINGS_CORE_OPTION_START),
|
|
|
|
type_str_size);
|
2014-10-26 21:09:49 +00:00
|
|
|
else
|
|
|
|
setting_data_get_label(type_str,
|
2014-09-10 16:26:02 +00:00
|
|
|
type_str_size, w, type, label, entry_label, i);
|
2014-09-10 23:57:25 +00:00
|
|
|
|
|
|
|
strlcpy(path_buf, path, path_buf_size);
|
2014-09-10 16:26:02 +00:00
|
|
|
}
|
|
|
|
|
2014-09-02 23:51:29 +00:00
|
|
|
#endif
|