2014-09-03 01:51:29 +02:00
|
|
|
#ifndef _DISP_SHARED_H
|
|
|
|
#define _DISP_SHARED_H
|
|
|
|
|
|
|
|
static void get_title(const char *label, const char *dir,
|
|
|
|
unsigned menu_type, unsigned menu_type_is,
|
|
|
|
char *title, size_t sizeof_title)
|
|
|
|
{
|
|
|
|
if (!strcmp(label, "core_list"))
|
|
|
|
snprintf(title, sizeof_title, "CORE SELECTION %s", dir);
|
2014-09-04 00:25:19 +02:00
|
|
|
else if (!strcmp(label, "deferred_core_list"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "DETECTED CORES %s", dir);
|
2014-09-04 19:43:54 +02:00
|
|
|
else if (!strcmp(label, "configurations"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "CONFIG %s", dir);
|
|
|
|
else if (menu_type == MENU_SETTINGS_DISK_APPEND)
|
|
|
|
snprintf(title, sizeof_title, "DISK APPEND %s", dir);
|
2014-09-04 19:02:42 +02:00
|
|
|
else if (!strcmp(label, "Video Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "VIDEO OPTIONS", sizeof_title);
|
2014-09-04 18:46:29 +02:00
|
|
|
else if (!strcmp(label, "Input Options") ||
|
2014-09-03 01:51:29 +02:00
|
|
|
menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
|
|
|
menu_type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD)
|
|
|
|
strlcpy(title, "INPUT OPTIONS", sizeof_title);
|
2014-09-04 18:12:14 +02:00
|
|
|
else if (!strcmp(label, "Overlay Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "OVERLAY OPTIONS", sizeof_title);
|
2014-09-04 01:00:11 +02:00
|
|
|
else if (!strcmp(label, "Netplay Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "NETPLAY OPTIONS", sizeof_title);
|
2014-09-04 01:00:11 +02:00
|
|
|
else if (!strcmp(label, "User Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "USER OPTIONS", sizeof_title);
|
2014-09-04 19:24:27 +02:00
|
|
|
else if (!strcmp(label, "Path Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "PATH OPTIONS", sizeof_title);
|
2014-09-04 19:20:14 +02:00
|
|
|
else if (!strcmp(label, "settings"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "SETTINGS", sizeof_title);
|
2014-09-04 18:50:03 +02:00
|
|
|
else if (!strcmp(label, "Driver Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "DRIVER OPTIONS", sizeof_title);
|
2014-09-03 22:04:46 +02:00
|
|
|
else if (!strcmp(label, "performance_counters"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "PERFORMANCE COUNTERS", sizeof_title);
|
2014-09-04 05:27:47 +02:00
|
|
|
else if (!strcmp(label, "frontend_counters"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "FRONTEND PERFORMANCE COUNTERS", sizeof_title);
|
2014-09-04 05:27:47 +02:00
|
|
|
else if (!strcmp(label, "core_counters"))
|
|
|
|
strlcpy(title, "CORE PERFORMANCE COUNTERS", sizeof_title);
|
2014-09-04 19:34:28 +02:00
|
|
|
else if (!strcmp(label, "Shader Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "SHADER OPTIONS", sizeof_title);
|
2014-09-04 19:34:28 +02:00
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
2014-09-03 01:51:29 +02:00
|
|
|
else if (menu_type == MENU_SETTINGS_SHADER_PARAMETERS)
|
|
|
|
strlcpy(title, "SHADER PARAMETERS (CURRENT)", sizeof_title);
|
|
|
|
else if (menu_type == MENU_SETTINGS_SHADER_PRESET_PARAMETERS)
|
|
|
|
strlcpy(title, "SHADER PARAMETERS (MENU PRESET)", sizeof_title);
|
|
|
|
#endif
|
2014-09-04 19:05:03 +02:00
|
|
|
else if (!strcmp(label, "Font Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "FONT OPTIONS", sizeof_title);
|
2014-09-04 19:06:30 +02:00
|
|
|
else if (!strcmp(label, "General Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "GENERAL OPTIONS", sizeof_title);
|
2014-09-04 18:37:31 +02:00
|
|
|
else if (!strcmp(label, "Audio Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "AUDIO OPTIONS", sizeof_title);
|
2014-09-04 21:11:53 +02:00
|
|
|
else if (!strcmp(label, "disk_options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "DISK OPTIONS", sizeof_title);
|
2014-09-04 18:15:58 +02:00
|
|
|
else if (!strcmp(label, "core_options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "CORE OPTIONS", sizeof_title);
|
|
|
|
else if (!strcmp(label, "core_information"))
|
|
|
|
strlcpy(title, "CORE INFO", sizeof_title);
|
2014-09-04 18:09:25 +02:00
|
|
|
else if (!strcmp(label, "Privacy Options"))
|
2014-09-03 01:51:29 +02:00
|
|
|
strlcpy(title, "PRIVACY OPTIONS", sizeof_title);
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
2014-09-03 02:22:32 +02:00
|
|
|
else if (!strcmp(label, "video_shader_pass"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "SHADER %s", dir);
|
2014-09-03 02:22:32 +02:00
|
|
|
else if (!strcmp(label, "video_shader_preset"))
|
|
|
|
snprintf(title, sizeof_title, "SHADER PRESET %s", dir);
|
2014-09-03 01:51:29 +02:00
|
|
|
#endif
|
2014-09-04 19:24:27 +02:00
|
|
|
else if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
2014-09-03 01:51:29 +02: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 05:31:54 +02:00
|
|
|
else if (!strcmp(label, "input_overlay"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "OVERLAY %s", dir);
|
2014-09-03 03:34:14 +02:00
|
|
|
else if (!strcmp(label, "video_filter"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "FILTER %s", dir);
|
2014-09-03 03:34:14 +02:00
|
|
|
else if (!strcmp(label, "audio_dsp_plugin"))
|
2014-09-03 01:51:29 +02: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-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "content_directory"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "CONTENT DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "screenshot_directory"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "SCREENSHOT DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "video_shader_dir"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "SHADER DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "video_filter_dir"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "FILTER DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "audio_filter_dir"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "DSP FILTER DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "savestate_directory"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "SAVESTATE DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "libretro_dir_path"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "LIBRETRO DIR %s", dir);
|
2014-09-04 03:31:44 +02: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-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "CONFIG DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "savefile_directory"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "SAVEFILE DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "overlay_directory"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "OVERLAY DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "system_directory"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "SYSTEM DIR %s", dir);
|
2014-09-04 03:31:44 +02:00
|
|
|
else if (!strcmp(label, "assets_directory"))
|
2014-09-03 01:51:29 +02:00
|
|
|
snprintf(title, sizeof_title, "ASSETS DIR %s", dir);
|
2014-09-04 03:31:44 +02: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-03 01:51:29 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if (driver.menu->defer_core)
|
|
|
|
snprintf(title, sizeof_title, "CONTENT %s", dir);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const char *core_name = driver.menu->info.library_name;
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|