mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-19 17:36:33 +00:00
Merge branch 'master' into ios10_cores_in_app_bundle
This commit is contained in:
commit
d0bced56c2
88
cheevos.c
88
cheevos.c
@ -649,7 +649,7 @@ void cheevos_parse_guest_addr(cheevos_var_t *var, unsigned value)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < sizeof(cheevos_locals.meminfo) / sizeof(cheevos_locals.meminfo[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(cheevos_locals.meminfo); i++)
|
||||
{
|
||||
if (var->value < cheevos_locals.meminfo[i].size)
|
||||
{
|
||||
@ -1824,8 +1824,8 @@ static size_t cheevos_eval_md5(
|
||||
|
||||
static void cheevos_fill_md5(size_t size, size_t total, MD5_CTX *ctx)
|
||||
{
|
||||
char buffer[4096];
|
||||
ssize_t fill = total - size;
|
||||
char buffer[4096] = {0};
|
||||
ssize_t fill = total - size;
|
||||
|
||||
memset((void*)buffer, 0, sizeof(buffer));
|
||||
|
||||
@ -1846,11 +1846,10 @@ static unsigned cheevos_find_game_id_generic(
|
||||
retro_time_t timeout)
|
||||
{
|
||||
MD5_CTX ctx;
|
||||
uint8_t hash[16];
|
||||
retro_time_t to;
|
||||
size_t size;
|
||||
|
||||
size = cheevos_eval_md5(info, &ctx);
|
||||
uint8_t hash[16] = {0};
|
||||
size_t size = cheevos_eval_md5(info, &ctx);
|
||||
|
||||
MD5_Final(hash, &ctx);
|
||||
|
||||
if (!size)
|
||||
@ -1865,11 +1864,9 @@ static unsigned cheevos_find_game_id_snes(
|
||||
retro_time_t timeout)
|
||||
{
|
||||
MD5_CTX ctx;
|
||||
uint8_t hash[16];
|
||||
retro_time_t to;
|
||||
size_t size;
|
||||
|
||||
size = cheevos_eval_md5(info, &ctx);
|
||||
uint8_t hash[16] = {0};
|
||||
size_t size = cheevos_eval_md5(info, &ctx);
|
||||
|
||||
if (!size)
|
||||
{
|
||||
@ -1935,8 +1932,8 @@ static unsigned cheevos_find_game_id_nes(
|
||||
}
|
||||
else
|
||||
{
|
||||
RFILE *file = filestream_open(info->path, RFILE_MODE_READ, 0);
|
||||
ssize_t num_read;
|
||||
RFILE *file = filestream_open(info->path, RFILE_MODE_READ, 0);
|
||||
|
||||
if (!file)
|
||||
return 0;
|
||||
@ -1978,8 +1975,8 @@ static unsigned cheevos_find_game_id_nes(
|
||||
{
|
||||
53, 198, 228
|
||||
};
|
||||
bool round = true;
|
||||
RFILE *file = filestream_open(info->path, RFILE_MODE_READ, 0);
|
||||
bool round = true;
|
||||
RFILE *file = filestream_open(info->path, RFILE_MODE_READ, 0);
|
||||
uint8_t * data = (uint8_t *) malloc(rom_size << 14);
|
||||
|
||||
if (!file || !data)
|
||||
@ -1997,7 +1994,7 @@ static unsigned cheevos_find_game_id_nes(
|
||||
mapper_no |= (header.rom_type2 & 0xF0);
|
||||
|
||||
|
||||
for (i = 0; i != sizeof(not_power2) / sizeof(not_power2[0]); ++i)
|
||||
for (i = 0; i != ARRAY_SIZE(not_power2); ++i)
|
||||
{
|
||||
/* for games not to the power of 2, so we just read enough
|
||||
* PRG rom from it, but we have to keep ROM_size to the power of 2
|
||||
@ -2100,14 +2097,16 @@ bool cheevos_load(const void *data)
|
||||
cheevos_locals.meminfo[3].id = RETRO_MEMORY_RTC;
|
||||
core_get_memory(&cheevos_locals.meminfo[3]);
|
||||
|
||||
/* Bail out if cheevos are disabled. But set the above anyways, command_read_ram needs it. */
|
||||
/* Bail out if cheevos are disabled.
|
||||
* But set the above anyways, command_read_ram needs it. */
|
||||
if (!settings->cheevos.enable)
|
||||
return true;
|
||||
|
||||
/* Use the supported extensions as a hint to what method we should use. */
|
||||
/* Use the supported extensions as a hint
|
||||
* to what method we should use. */
|
||||
core_get_system_info(&sysinfo);
|
||||
|
||||
for (i = 0; i < sizeof(finders) / sizeof(finders[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(finders); i++)
|
||||
{
|
||||
if (finders[i].ext_hashes)
|
||||
{
|
||||
@ -2149,7 +2148,7 @@ bool cheevos_load(const void *data)
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < sizeof(finders) / sizeof(finders[0]); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(finders); i++)
|
||||
{
|
||||
if (finders[i].ext_hashes)
|
||||
continue;
|
||||
@ -2175,7 +2174,8 @@ found:
|
||||
cheevos_locals.loaded = 1;
|
||||
|
||||
cheevos_make_playing_url(game_id, url, sizeof(url));
|
||||
task_push_http_transfer(url, true, NULL, cheevos_playing, (void*)(uintptr_t)game_id);
|
||||
task_push_http_transfer(url, true, NULL,
|
||||
cheevos_playing, (void*)(uintptr_t)game_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2191,28 +2191,24 @@ void cheevos_populate_menu(void *data)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
unsigned i;
|
||||
unsigned items_found = 0;
|
||||
const cheevo_t *end = NULL;
|
||||
cheevo_t *cheevo = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_displaylist_info_t *info = (menu_displaylist_info_t*)data;
|
||||
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS),
|
||||
MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
menu_entries_add_enum(info->list, "", "", MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
|
||||
cheevo = cheevos_locals.core.cheevos;
|
||||
end = cheevos_locals.core.cheevos + cheevos_locals.core.count;
|
||||
|
||||
for (i = 0; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (!cheevo->active)
|
||||
{
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->cheevos.test_unofficial)
|
||||
@ -2225,30 +2221,23 @@ void cheevos_populate_menu(void *data)
|
||||
{
|
||||
if (!cheevo->active)
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
menu_entries_add_enum(info->list, "", "", MSG_UNKNOWN,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS),
|
||||
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
menu_entries_add_enum(info->list, "", "", MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS,
|
||||
MENU_SETTINGS_CHEEVOS_NONE, 0, 0);
|
||||
|
||||
cheevo = cheevos_locals.core.cheevos;
|
||||
end = cheevos_locals.core.cheevos + cheevos_locals.core.count;
|
||||
|
||||
for (i = 0; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (cheevo->active)
|
||||
{
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->cheevos.test_unofficial)
|
||||
@ -2260,11 +2249,23 @@ void cheevos_populate_menu(void *data)
|
||||
for (i = cheevos_locals.core.count; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (cheevo->active)
|
||||
{
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (items_found == 0)
|
||||
{
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY),
|
||||
MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY,
|
||||
FILE_TYPE_NONE, 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -2317,7 +2318,8 @@ bool cheevos_toggle_hardcore_mode(void)
|
||||
command_event(CMD_EVENT_REWIND_DEINIT, NULL);
|
||||
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE));
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE), 0, 3 * 60, true);
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE), 0, 3 * 60, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -524,13 +524,17 @@ static bool xmb_shadows_enable = false;
|
||||
static bool xmb_shadows_enable = true;
|
||||
#endif
|
||||
|
||||
static float menu_wallpaper_opacity = 0.300;
|
||||
|
||||
static unsigned menu_background_gradient = 4;
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) || defined(HAVE_VULKAN)
|
||||
#if defined(HAVE_OPENGLES2) || defined(OSX_PPC)
|
||||
static unsigned menu_shader_pipeline = 1;
|
||||
#else
|
||||
static unsigned menu_shader_pipeline = 2;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static bool show_advanced_settings = true;
|
||||
static const uint32_t menu_entry_normal_color = 0xffffffff;
|
||||
|
@ -465,15 +465,19 @@ static void config_set_defaults(void)
|
||||
if (def_menu)
|
||||
strlcpy(settings->menu.driver,
|
||||
def_menu, sizeof(settings->menu.driver));
|
||||
settings->menu.xmb_scale_factor = xmb_scale_factor;
|
||||
settings->menu.xmb_alpha_factor = xmb_alpha_factor;
|
||||
settings->menu.xmb_theme = xmb_theme;
|
||||
settings->menu.background_gradient= menu_background_gradient;
|
||||
settings->menu.xmb_shadows_enable = xmb_shadows_enable;
|
||||
settings->menu.shader_pipeline = menu_shader_pipeline;
|
||||
settings->menu.xmb_font[0] = '\0';
|
||||
settings->menu.throttle_framerate = true;
|
||||
settings->menu.linear_filter = true;
|
||||
#ifdef HAVE_XMB
|
||||
settings->menu.xmb.scale_factor = xmb_scale_factor;
|
||||
settings->menu.xmb.alpha_factor = xmb_alpha_factor;
|
||||
settings->menu.xmb.theme = xmb_theme;
|
||||
settings->menu.xmb.menu_color_theme = menu_background_gradient;
|
||||
settings->menu.xmb.shadows_enable = xmb_shadows_enable;
|
||||
settings->menu.xmb.shader_pipeline = menu_shader_pipeline;
|
||||
settings->menu.xmb.font[0] = '\0';
|
||||
#endif
|
||||
settings->menu.materialui.menu_color_theme = 0;
|
||||
|
||||
settings->menu.throttle_framerate = true;
|
||||
settings->menu.linear_filter = true;
|
||||
#endif
|
||||
|
||||
settings->history_list_enable = def_history_list_enable;
|
||||
@ -605,6 +609,7 @@ static void config_set_defaults(void)
|
||||
settings->menu.timedate_enable = true;
|
||||
settings->menu.core_enable = true;
|
||||
settings->menu.dynamic_wallpaper_enable = false;
|
||||
settings->menu.wallpaper.opacity = menu_wallpaper_opacity;
|
||||
settings->menu.thumbnails = menu_thumbnails_default;
|
||||
settings->menu.show_advanced_settings = show_advanced_settings;
|
||||
settings->menu.entry_normal_color = menu_entry_normal_color;
|
||||
@ -1324,6 +1329,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
"menu_core_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, menu.dynamic_wallpaper_enable,
|
||||
"menu_dynamic_wallpaper_enable");
|
||||
CONFIG_GET_FLOAT_BASE(conf, settings, menu.wallpaper.opacity, "menu_wallpaper_opacity");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.thumbnails,
|
||||
"menu_thumbnails");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, menu.navigation.wraparound.enable,
|
||||
@ -1523,14 +1529,17 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
config_get_array(conf, "location_driver", settings->location.driver, sizeof(settings->location.driver));
|
||||
#ifdef HAVE_MENU
|
||||
config_get_array(conf, "menu_driver", settings->menu.driver, sizeof(settings->menu.driver));
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb_scale_factor, "xmb_scale_factor");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb_alpha_factor, "xmb_alpha_factor");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb_theme, "xmb_theme");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.background_gradient, "menu_background_gradient");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, menu.xmb_shadows_enable, "xmb_shadows_enable");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.shader_pipeline, "menu_shader_pipeline");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb.scale_factor, "xmb_scale_factor");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb.alpha_factor, "xmb_alpha_factor");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb.theme, "xmb_theme");
|
||||
#ifdef HAVE_XMB
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb.menu_color_theme, "xmb_menu_color_theme");
|
||||
#endif
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.materialui.menu_color_theme, "materialui_menu_color_theme");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, menu.xmb.shadows_enable, "xmb_shadows_enable");
|
||||
CONFIG_GET_INT_BASE(conf, settings, menu.xmb.shader_pipeline, "menu_shader_pipeline");
|
||||
if (config_get_path(conf, "xmb_font", tmp_str, sizeof(tmp_str)))
|
||||
strlcpy(settings->menu.xmb_font, tmp_str, sizeof(settings->menu.xmb_font));
|
||||
strlcpy(settings->menu.xmb.font, tmp_str, sizeof(settings->menu.xmb.font));
|
||||
#endif
|
||||
config_get_array(conf, "video_context_driver",
|
||||
settings->video.context_driver,
|
||||
@ -2700,6 +2709,8 @@ bool config_save_file(const char *path)
|
||||
#ifdef HAVE_MENU
|
||||
config_set_path(conf, "menu_wallpaper",
|
||||
settings->path.menu_wallpaper);
|
||||
config_set_float(conf, "menu_wallpaper_opacity",
|
||||
settings->menu.wallpaper.opacity);
|
||||
#endif
|
||||
config_set_string(conf, "video_filter",
|
||||
settings->path.softfilter_plugin);
|
||||
@ -2935,14 +2946,17 @@ bool config_save_file(const char *path)
|
||||
*global->dir.savestate ? global->dir.savestate : "default");
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
config_set_int(conf, "xmb_scale_factor", settings->menu.xmb_scale_factor);
|
||||
config_set_int(conf, "xmb_alpha_factor", settings->menu.xmb_alpha_factor);
|
||||
config_set_int(conf, "xmb_theme", settings->menu.xmb_theme);
|
||||
config_set_int(conf, "menu_background_gradient", settings->menu.background_gradient);
|
||||
config_set_bool(conf, "xmb_shadows_enable", settings->menu.xmb_shadows_enable);
|
||||
config_set_int(conf, "menu_shader_pipeline", settings->menu.shader_pipeline);
|
||||
config_set_int(conf, "xmb_scale_factor", settings->menu.xmb.scale_factor);
|
||||
config_set_int(conf, "xmb_alpha_factor", settings->menu.xmb.alpha_factor);
|
||||
config_set_int(conf, "xmb_theme", settings->menu.xmb.theme);
|
||||
#ifdef HAVE_XMB
|
||||
config_set_int(conf, "xmb_menu_color_theme", settings->menu.xmb.menu_color_theme);
|
||||
#endif
|
||||
config_set_int(conf, "materialui_menu_color_theme", settings->menu.materialui.menu_color_theme);
|
||||
config_set_bool(conf, "xmb_shadows_enable", settings->menu.xmb.shadows_enable);
|
||||
config_set_int(conf, "menu_shader_pipeline", settings->menu.xmb.shader_pipeline);
|
||||
config_set_path(conf, "xmb_font",
|
||||
!string_is_empty(settings->menu.xmb_font) ? settings->menu.xmb_font : "");
|
||||
!string_is_empty(settings->menu.xmb.font) ? settings->menu.xmb.font : "");
|
||||
config_set_bool(conf, "rgui_show_start_screen",
|
||||
settings->menu_show_start_screen);
|
||||
config_set_bool(conf, "menu_navigation_wraparound_enable",
|
||||
|
@ -121,6 +121,11 @@ typedef struct settings
|
||||
unsigned thumbnails;
|
||||
bool throttle;
|
||||
|
||||
struct
|
||||
{
|
||||
float opacity;
|
||||
} wallpaper;
|
||||
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
@ -158,15 +163,24 @@ typedef struct settings
|
||||
unsigned entry_normal_color;
|
||||
unsigned entry_hover_color;
|
||||
unsigned title_color;
|
||||
unsigned xmb_scale_factor;
|
||||
unsigned xmb_alpha_factor;
|
||||
unsigned xmb_theme;
|
||||
unsigned background_gradient;
|
||||
bool xmb_shadows_enable;
|
||||
unsigned shader_pipeline;
|
||||
char xmb_font[PATH_MAX_LENGTH];
|
||||
bool throttle_framerate;
|
||||
bool linear_filter;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned shader_pipeline;
|
||||
char font[PATH_MAX_LENGTH];
|
||||
unsigned scale_factor;
|
||||
unsigned alpha_factor;
|
||||
unsigned theme;
|
||||
unsigned menu_color_theme;
|
||||
bool shadows_enable;
|
||||
} xmb;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned menu_color_theme;
|
||||
} materialui;
|
||||
} menu;
|
||||
#endif
|
||||
|
||||
|
@ -540,11 +540,11 @@ bool core_info_load(core_info_ctx_find_t *info)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_info_find(core_info_ctx_find_t *info)
|
||||
bool core_info_find(core_info_ctx_find_t *info, const char *core_path)
|
||||
{
|
||||
if (!info || !core_info_curr_list)
|
||||
return false;
|
||||
info->inf = core_info_find_internal(core_info_curr_list, info->path);
|
||||
info->inf = core_info_find_internal(core_info_curr_list, core_path);
|
||||
if (!info->inf)
|
||||
return false;
|
||||
return true;
|
||||
|
@ -115,7 +115,7 @@ bool core_info_get_list(core_info_list_t **core);
|
||||
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info);
|
||||
|
||||
bool core_info_find(core_info_ctx_find_t *info);
|
||||
bool core_info_find(core_info_ctx_find_t *info, const char *name);
|
||||
|
||||
bool core_info_load(core_info_ctx_find_t *info);
|
||||
|
||||
|
@ -410,8 +410,8 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!string_is_empty(settings->menu.xmb_font))
|
||||
strlcpy(s, settings->menu.xmb_font, len);
|
||||
if (!string_is_empty(settings->menu.xmb.font))
|
||||
strlcpy(s, settings->menu.xmb.font, len);
|
||||
else
|
||||
{
|
||||
char s1[PATH_MAX_LENGTH] = {0};
|
||||
|
@ -419,12 +419,12 @@ bool x11_alive(void *data)
|
||||
case ClientMessage:
|
||||
if (event.xclient.window == g_x11_win &&
|
||||
(Atom)event.xclient.data.l[0] == g_x11_quit_atom)
|
||||
frontend_driver_destroy_signal_handler_state();
|
||||
frontend_driver_set_signal_handler_state(1);
|
||||
break;
|
||||
|
||||
case DestroyNotify:
|
||||
if (event.xdestroywindow.window == g_x11_win)
|
||||
frontend_driver_destroy_signal_handler_state();
|
||||
frontend_driver_set_signal_handler_state(1);
|
||||
break;
|
||||
|
||||
case MapNotify:
|
||||
|
@ -1070,7 +1070,9 @@ const char *msg_hash_to_str_fr(enum msg_hash_enums msg)
|
||||
return "XMB : Police";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_THEME:
|
||||
return "XMB : Theme";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_GRADIENT:
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME:
|
||||
return "Dégradé de font d'écran";
|
||||
case MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME:
|
||||
return "Dégradé de font d'écran";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE:
|
||||
return "Ombres pour les icones";
|
||||
|
@ -1110,6 +1110,15 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||
|
||||
static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
{
|
||||
if (msg <= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_END &&
|
||||
msg >= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN)
|
||||
{
|
||||
static char hotkey_lbl[PATH_MAX_LENGTH] = {0};
|
||||
unsigned idx = msg - MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN;
|
||||
snprintf(hotkey_lbl, sizeof(hotkey_lbl), "input_hotkey_binds_%d", idx);
|
||||
return hotkey_lbl;
|
||||
}
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case MENU_ENUM_LABEL_VIDEO_MAX_SWAPCHAIN_IMAGES:
|
||||
@ -1184,8 +1193,12 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "input_libretro_device_p%u";
|
||||
case MENU_ENUM_LABEL_RUN:
|
||||
return "collection";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_ENTRY:
|
||||
return "cheevos_entry";
|
||||
case MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY:
|
||||
return "playlist_collection_entry";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY:
|
||||
return "cheevos_locked_entry";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY:
|
||||
return "cheevos_unlocked_entry";
|
||||
case MENU_ENUM_LABEL_FILEBROWSER_ENTRY:
|
||||
return "filebrowser_entry";
|
||||
case MENU_ENUM_LABEL_CORE_INFO_ENTRY:
|
||||
@ -1252,6 +1265,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "no_performance_counters";
|
||||
case MENU_ENUM_LABEL_NO_ENTRIES_TO_DISPLAY:
|
||||
return "no_entries_to_display";
|
||||
case MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY:
|
||||
return "no_achievements_to_display";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS:
|
||||
return "cheevos_unlocked_achievements";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS:
|
||||
@ -1624,8 +1639,10 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "xmb_font";
|
||||
case MENU_ENUM_LABEL_XMB_THEME:
|
||||
return "xmb_theme";
|
||||
case MENU_ENUM_LABEL_XMB_GRADIENT:
|
||||
return "xmb_gradient";
|
||||
case MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME:
|
||||
return "xmb_menu_color_theme";
|
||||
case MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME:
|
||||
return "materialui_menu_color_theme";
|
||||
case MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE:
|
||||
return "xmb_shadows_enable";
|
||||
case MENU_ENUM_LABEL_XMB_RIBBON_ENABLE:
|
||||
@ -2080,6 +2097,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "use_builtin_image_viewer";
|
||||
case MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
|
||||
return "input_poll_type_behavior";
|
||||
case MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY:
|
||||
return "menu_wallpaper_opacity";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -2098,6 +2117,48 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED:
|
||||
return "Ribbon (simplified)";
|
||||
case MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON:
|
||||
return "Ribbon";
|
||||
case MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_BLUE:
|
||||
return "Blue";
|
||||
case MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_RED:
|
||||
return "Red";
|
||||
case MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_YELLOW:
|
||||
return "Yellow";
|
||||
case MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_GREEN:
|
||||
return "Green";
|
||||
case MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_DARK_BLUE:
|
||||
return "Dark Blue";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LEGACY_RED:
|
||||
return "Legacy Red";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK_PURPLE:
|
||||
return "Dark Purple";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_MIDNIGHT_BLUE:
|
||||
return "Midnight Blue";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_GOLDEN:
|
||||
return "Golden";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_ELECTRIC_BLUE:
|
||||
return "Electric Blue";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_APPLE_GREEN:
|
||||
return "Apple Green";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_UNDERSEA:
|
||||
return "Undersea";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_VOLCANIC_RED:
|
||||
return "Volcanic Red";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK:
|
||||
return "Dark";
|
||||
case MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY:
|
||||
return "Unlocked";
|
||||
case MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY:
|
||||
return "Unlocked";
|
||||
case MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_LATE:
|
||||
return "Late";
|
||||
case MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_NORMAL:
|
||||
return "Normal";
|
||||
case MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY:
|
||||
return "Early";
|
||||
case MSG_INTERNAL_MEMORY:
|
||||
return "Internal Memory";
|
||||
case MSG_EXTERNAL_APPLICATION_DIR:
|
||||
@ -2498,6 +2559,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "Custom Viewport Height";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY:
|
||||
return "No entries to display.";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY:
|
||||
return "No achievements to display.";
|
||||
case MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS:
|
||||
return "Unlocked Achievements:";
|
||||
case MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS:
|
||||
@ -2830,8 +2893,10 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "XMB Font";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_THEME:
|
||||
return "XMB Theme";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_GRADIENT:
|
||||
return "Background Gradient";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME:
|
||||
return "Menu Color Theme";
|
||||
case MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME:
|
||||
return "Menu Color Theme";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE:
|
||||
return "Icon Shadows Enable";
|
||||
case MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE:
|
||||
@ -3526,6 +3591,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "Title Screens";
|
||||
case MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS:
|
||||
return "Boxarts";
|
||||
case MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY:
|
||||
return "Wallpaper opacity";
|
||||
default:
|
||||
#if 0
|
||||
RARCH_LOG("Unimplemented: [%d]\n", msg);
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "../menu_animation.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_shader.h"
|
||||
#include "../menu_display.h"
|
||||
|
||||
#include "../../input/input_autodetect.h"
|
||||
#include "../../input/input_config.h"
|
||||
@ -61,7 +62,7 @@ static void menu_action_setting_disp_set_label_cheat_num_passes(
|
||||
snprintf(s, len, "%u", cheat_manager_get_buf_size());
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_cheevos_entry(
|
||||
static void menu_action_setting_disp_set_label_cheevos_locked_entry(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
@ -72,7 +73,23 @@ static void menu_action_setting_disp_set_label_cheevos_entry(
|
||||
{
|
||||
*w = 19;
|
||||
strlcpy(s2, path, len2);
|
||||
strlcpy(s, "", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY), len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_cheevos_unlocked_entry(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
*w = 19;
|
||||
strlcpy(s2, path, len2);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY), len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_remap_file_load(
|
||||
@ -194,16 +211,20 @@ static void menu_action_setting_disp_set_label_pipeline(
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
|
||||
switch (settings->menu.shader_pipeline)
|
||||
switch (settings->menu.xmb.shader_pipeline)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s, "Ribbon (simplified)", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s, "Ribbon", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON), len);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -315,7 +336,8 @@ static void menu_action_setting_disp_set_label_shader_parameter(
|
||||
if (!shader_info.data)
|
||||
return;
|
||||
|
||||
param = &shader_info.data->parameters[type - MENU_SETTINGS_SHADER_PARAMETER_0];
|
||||
param = &shader_info.data->parameters[type -
|
||||
MENU_SETTINGS_SHADER_PARAMETER_0];
|
||||
|
||||
if (!param)
|
||||
return;
|
||||
@ -454,7 +476,7 @@ static void menu_action_setting_disp_set_label_input_desc(
|
||||
|
||||
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
|
||||
{
|
||||
if(strstr(descriptor,"Auto") && !strstr(descriptor,
|
||||
if(strstr(descriptor, "Auto") && !strstr(descriptor,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)))
|
||||
strlcpy(s,
|
||||
descriptor,
|
||||
@ -621,13 +643,19 @@ static void menu_action_setting_disp_set_label_poll_type_behavior(
|
||||
switch (settings->input.poll_type_behavior)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, "Early", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s, "Normal", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_NORMAL), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s, "Late", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_LATE), len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -648,7 +676,7 @@ static void menu_action_setting_disp_set_label_xmb_theme(
|
||||
|
||||
strlcpy(s2, path, len2);
|
||||
*w = 19;
|
||||
switch (settings->menu.xmb_theme)
|
||||
switch (settings->menu.xmb.theme)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, "Monochrome", len);
|
||||
@ -668,7 +696,7 @@ static void menu_action_setting_disp_set_label_xmb_theme(
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_xmb_gradient(
|
||||
static void menu_action_setting_disp_set_label_xmb_menu_color_theme(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
@ -685,34 +713,110 @@ static void menu_action_setting_disp_set_label_xmb_gradient(
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
switch (settings->menu.background_gradient)
|
||||
switch (settings->menu.xmb.menu_color_theme)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, "Legacy Red", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LEGACY_RED),
|
||||
len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s, "Dark Purple", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK_PURPLE),
|
||||
len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s, "Midnight Blue", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_MIDNIGHT_BLUE),
|
||||
len);
|
||||
break;
|
||||
case 3:
|
||||
strlcpy(s, "Golden", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_GOLDEN),
|
||||
len);
|
||||
break;
|
||||
case 4:
|
||||
strlcpy(s, "Electric Blue", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_ELECTRIC_BLUE),
|
||||
len);
|
||||
break;
|
||||
case 5:
|
||||
strlcpy(s, "Apple Green", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_APPLE_GREEN),
|
||||
len);
|
||||
break;
|
||||
case 6:
|
||||
strlcpy(s, "Undersea", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_UNDERSEA),
|
||||
len);
|
||||
break;
|
||||
case 7:
|
||||
strlcpy(s, "Volcanic Red", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_VOLCANIC_RED),
|
||||
len);
|
||||
break;
|
||||
case 8:
|
||||
strlcpy(s, "Dark", len);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK),
|
||||
len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_materialui_menu_color_theme(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
strlcpy(s2, path, len2);
|
||||
*w = 19;
|
||||
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
switch (settings->menu.materialui.menu_color_theme)
|
||||
{
|
||||
case MATERIALUI_THEME_BLUE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_BLUE), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_GREEN:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_GREEN), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_RED:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_RED), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_YELLOW:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_YELLOW), len);
|
||||
break;
|
||||
case MATERIALUI_THEME_DARK_BLUE:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_DARK_BLUE), len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1381,7 +1485,7 @@ static void menu_action_setting_disp_set_label(file_list_t* list,
|
||||
}
|
||||
|
||||
static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
menu_file_list_cbs_t *cbs, uint32_t label_hash)
|
||||
menu_file_list_cbs_t *cbs)
|
||||
{
|
||||
if (cbs->enum_idx != MSG_UNKNOWN)
|
||||
{
|
||||
@ -1399,9 +1503,13 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_xmb_theme);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_XMB_GRADIENT:
|
||||
case MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_xmb_gradient);
|
||||
menu_action_setting_disp_set_label_xmb_menu_color_theme);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_materialui_menu_color_theme);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_THUMBNAILS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
@ -1495,94 +1603,7 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_XMB_THEME:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_xmb_theme);
|
||||
break;
|
||||
case MENU_LABEL_XMB_GRADIENT:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_xmb_gradient);
|
||||
break;
|
||||
case MENU_LABEL_THUMBNAILS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_thumbnails);
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_remap_file_load);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_filter_pass);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_scale_pass);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_num_passes);
|
||||
break;
|
||||
case MENU_LABEL_XMB_RIBBON_ENABLE:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_pipeline);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_pass);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_default_filter);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_filter);
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATIONS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_configurations);
|
||||
break;
|
||||
case MENU_LABEL_SCREEN_RESOLUTION:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_menu_video_resolution);
|
||||
break;
|
||||
case MENU_LABEL_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_menu_input_keyboard_gamepad_mapping_type);
|
||||
break;
|
||||
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
||||
case MENU_LABEL_LOAD_CONTENT_HISTORY:
|
||||
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
case MENU_LABEL_LOAD_CONTENT:
|
||||
case MENU_LABEL_CORE_OPTIONS:
|
||||
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
||||
case MENU_LABEL_SHADER_OPTIONS:
|
||||
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS:
|
||||
case MENU_LABEL_CHEAT_FILE_SAVE_AS:
|
||||
case MENU_LABEL_FRONTEND_COUNTERS:
|
||||
case MENU_LABEL_CORE_COUNTERS:
|
||||
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
||||
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
||||
case MENU_LABEL_CLOSE_CONTENT:
|
||||
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
case MENU_LABEL_CORE_INFORMATION:
|
||||
case MENU_LABEL_SYSTEM_INFORMATION:
|
||||
case MENU_LABEL_DEBUG_INFORMATION:
|
||||
case MENU_LABEL_ACHIEVEMENT_LIST:
|
||||
case MENU_LABEL_SAVE_STATE:
|
||||
case MENU_LABEL_LOAD_STATE:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_menu_more);
|
||||
break;
|
||||
default:
|
||||
return - 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1728,8 +1749,7 @@ static int menu_cbs_init_bind_get_string_representation_compare_type(
|
||||
}
|
||||
|
||||
int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
const char *path, const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
if (!cbs)
|
||||
return -1;
|
||||
@ -1738,9 +1758,13 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
switch (cbs->enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_CHEEVOS_ENTRY:
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheevos_entry);
|
||||
menu_action_setting_disp_set_label_cheevos_unlocked_entry);
|
||||
return 0;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheevos_locked_entry);
|
||||
return 0;
|
||||
case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
@ -1762,30 +1786,6 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_LABEL_LOAD_CONTENT_HISTORY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_content_history);
|
||||
return 0;
|
||||
case MENU_LABEL_SYSTEM_INFORMATION:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_system_information);
|
||||
return 0;
|
||||
case MENU_LABEL_DEBUG_INFORMATION:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_debug_information);
|
||||
return 0;
|
||||
case MENU_LABEL_ACHIEVEMENT_LIST:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_achievement_information);
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (type >= MENU_SETTINGS_PLAYLIST_ASSOCIATION_START)
|
||||
{
|
||||
@ -1815,7 +1815,7 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (menu_cbs_init_bind_get_string_representation_compare_label(cbs, label_hash) == 0)
|
||||
if (menu_cbs_init_bind_get_string_representation_compare_label(cbs) == 0)
|
||||
return 0;
|
||||
|
||||
if (menu_cbs_init_bind_get_string_representation_compare_type(cbs, type) == 0)
|
||||
|
@ -14,10 +14,12 @@
|
||||
*/
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_navigation.h"
|
||||
#include "../../file_path_special.h"
|
||||
|
||||
#ifndef BIND_ACTION_LABEL
|
||||
#define BIND_ACTION_LABEL(cbs, name) \
|
||||
@ -25,35 +27,72 @@
|
||||
cbs->action_label_ident = #name;
|
||||
#endif
|
||||
|
||||
static int action_bind_label_generic(char *s, size_t len)
|
||||
static int action_bind_label_generic(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_bind_label_information(char *s, size_t len)
|
||||
static int action_bind_label_information(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INFORMATION), len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_bind_label_internal_memory(char *s, size_t len)
|
||||
static int action_bind_label_internal_memory(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
strlcpy(s, msg_hash_to_str(MSG_INTERNAL_MEMORY), len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_bind_label_external_application_dir(char *s, size_t len)
|
||||
static int action_bind_label_external_application_dir(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
strlcpy(s, msg_hash_to_str(MSG_EXTERNAL_APPLICATION_DIR), len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_bind_label_application_dir(char *s, size_t len)
|
||||
static int action_bind_label_application_dir(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
strlcpy(s, msg_hash_to_str(MSG_APPLICATION_DIR), len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_bind_label_playlist_collection_entry(
|
||||
file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (strstr(path, file_path_str(FILE_PATH_LPL_EXTENSION)))
|
||||
{
|
||||
char path_base[PATH_MAX_LENGTH] = {0};
|
||||
fill_short_pathname_representation_noext(path_base, path,
|
||||
sizeof(path_base));
|
||||
|
||||
strlcpy(s, path_base, len);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int menu_cbs_init_bind_label(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
@ -66,6 +105,9 @@ int menu_cbs_init_bind_label(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
switch (cbs->enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY:
|
||||
BIND_ACTION_LABEL(cbs, action_bind_label_playlist_collection_entry);
|
||||
break;
|
||||
case MSG_INTERNAL_MEMORY:
|
||||
BIND_ACTION_LABEL(cbs, action_bind_label_internal_memory);
|
||||
break;
|
||||
|
@ -429,6 +429,12 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)))
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strstr(label, "rdb_entry"))
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, action_left_scroll);
|
||||
@ -474,20 +480,7 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE:
|
||||
if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU)) ||
|
||||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) ||
|
||||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU))
|
||||
)
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -535,6 +535,12 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)))
|
||||
{
|
||||
BIND_ACTION_RIGHT(cbs, action_right_mainmenu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strstr(label, "rdb_entry"))
|
||||
{
|
||||
BIND_ACTION_RIGHT(cbs, action_right_scroll);
|
||||
@ -579,20 +585,7 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE:
|
||||
if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU)) ||
|
||||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) ||
|
||||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU))
|
||||
)
|
||||
{
|
||||
BIND_ACTION_RIGHT(cbs, action_right_mainmenu);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,6 +114,14 @@ typedef struct mui_handle
|
||||
float scroll_y;
|
||||
} mui_handle_t;
|
||||
|
||||
static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha)
|
||||
{
|
||||
rgba[0] = rgba[4] = rgba[8] = rgba[12] = ((hex >> 16) & 0xFF) * (1.0f / 255.0f); /* r */
|
||||
rgba[1] = rgba[5] = rgba[9] = rgba[13] = ((hex >> 8 ) & 0xFF) * (1.0f / 255.0f); /* g */
|
||||
rgba[2] = rgba[6] = rgba[10] = rgba[14] = ((hex >> 0 ) & 0xFF) * (1.0f / 255.0f); /* b */
|
||||
rgba[3] = rgba[7] = rgba[11] = rgba[15] = alpha;
|
||||
}
|
||||
|
||||
static const char *mui_texture_path(unsigned id)
|
||||
{
|
||||
switch (id)
|
||||
@ -217,7 +225,7 @@ static void mui_draw_icon(
|
||||
static void mui_draw_tab(mui_handle_t *mui,
|
||||
unsigned i,
|
||||
unsigned width, unsigned height,
|
||||
float *pure_white)
|
||||
float *tab_color)
|
||||
{
|
||||
unsigned tab_icon = 0;
|
||||
|
||||
@ -249,7 +257,7 @@ static void mui_draw_tab(mui_handle_t *mui,
|
||||
height,
|
||||
0,
|
||||
1,
|
||||
&pure_white[0]);
|
||||
&tab_color[0]); /* default color is pure_white */
|
||||
}
|
||||
|
||||
static void mui_draw_text(float x, float y, unsigned width, unsigned height,
|
||||
@ -305,7 +313,7 @@ static void mui_render_quad(mui_handle_t *mui,
|
||||
|
||||
static void mui_draw_tab_begin(mui_handle_t *mui,
|
||||
unsigned width, unsigned height,
|
||||
float *white_bg, float *grey_bg)
|
||||
float *tabs_bg_color, float *tabs_separator_color)
|
||||
{
|
||||
float scale_factor = menu_display_get_dpi();
|
||||
|
||||
@ -315,19 +323,19 @@ static void mui_draw_tab_begin(mui_handle_t *mui,
|
||||
mui_render_quad(mui, 0, height - mui->tabs_height, width,
|
||||
mui->tabs_height,
|
||||
width, height,
|
||||
white_bg);
|
||||
tabs_bg_color); /* white_bg */
|
||||
|
||||
/* tabs separator */
|
||||
mui_render_quad(mui, 0, height - mui->tabs_height, width,
|
||||
1,
|
||||
width, height,
|
||||
grey_bg);
|
||||
tabs_separator_color); /* grey_bg */
|
||||
}
|
||||
|
||||
static void mui_draw_tab_end(mui_handle_t *mui,
|
||||
unsigned width, unsigned height,
|
||||
unsigned header_height,
|
||||
float *blue_bg)
|
||||
float *active_tab_marker_color)
|
||||
{
|
||||
/* active tab marker */
|
||||
unsigned tab_width = width / (MUI_SYSTEM_TAB_END+1);
|
||||
@ -337,7 +345,7 @@ static void mui_draw_tab_end(mui_handle_t *mui,
|
||||
tab_width,
|
||||
header_height/16,
|
||||
width, height,
|
||||
&blue_bg[0]);
|
||||
&active_tab_marker_color[0]); /* blue_500 */
|
||||
}
|
||||
|
||||
static void mui_draw_scrollbar(mui_handle_t *mui,
|
||||
@ -391,7 +399,7 @@ static void mui_get_message(void *data, const char *message)
|
||||
static void mui_render_messagebox(const char *message)
|
||||
{
|
||||
unsigned i, width, height;
|
||||
uint32_t normal_color;
|
||||
uint32_t font_normal_color;
|
||||
int x, y, font_size;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *list = (struct string_list*)
|
||||
@ -409,7 +417,7 @@ static void mui_render_messagebox(const char *message)
|
||||
x = width / 2;
|
||||
y = height / 2 - list->size * font_size / 2;
|
||||
|
||||
normal_color = FONT_COLOR_ARGB_TO_RGBA(settings->menu.entry_normal_color);
|
||||
font_normal_color = FONT_COLOR_ARGB_TO_RGBA(settings->menu.entry_normal_color);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
@ -417,7 +425,7 @@ static void mui_render_messagebox(const char *message)
|
||||
if (msg)
|
||||
mui_draw_text(x, y + i * font_size,
|
||||
width, height,
|
||||
msg, normal_color, TEXT_ALIGN_CENTER);
|
||||
msg, font_normal_color, TEXT_ALIGN_CENTER);
|
||||
}
|
||||
|
||||
end:
|
||||
@ -595,14 +603,14 @@ static void mui_render_label_value(mui_handle_t *mui,
|
||||
height,
|
||||
0,
|
||||
1,
|
||||
&pure_white[0]);
|
||||
&pure_white[0]); /* pure_white */
|
||||
}
|
||||
|
||||
static void mui_render_menu_list(mui_handle_t *mui,
|
||||
unsigned width, unsigned height,
|
||||
uint32_t normal_color,
|
||||
uint32_t hover_color,
|
||||
float *pure_white)
|
||||
uint32_t font_normal_color,
|
||||
uint32_t font_hover_color,
|
||||
float *menu_list_color)
|
||||
{
|
||||
unsigned header_height;
|
||||
uint64_t *frame_count;
|
||||
@ -641,9 +649,18 @@ static void mui_render_menu_list(mui_handle_t *mui,
|
||||
|
||||
entry_selected = selection == i;
|
||||
|
||||
mui_render_label_value(mui, y, width, height, *frame_count / 20,
|
||||
entry_selected ? hover_color : normal_color, entry_selected,
|
||||
rich_label, entry.value, pure_white);
|
||||
mui_render_label_value(
|
||||
mui,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
*frame_count / 20,
|
||||
entry_selected ? font_hover_color : font_normal_color,
|
||||
entry_selected,
|
||||
rich_label,
|
||||
entry.value,
|
||||
menu_list_color /* pure_white */
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -716,37 +733,23 @@ static void mui_draw_bg(menu_display_ctx_draw_t *draw)
|
||||
|
||||
static void mui_frame(void *data)
|
||||
{
|
||||
unsigned header_height;
|
||||
bool display_kb;
|
||||
float black_bg[16] = {
|
||||
0, 0, 0, 0.75,
|
||||
0, 0, 0, 0.75,
|
||||
0, 0, 0, 0.75,
|
||||
0, 0, 0, 0.75,
|
||||
};
|
||||
float blue_bg[16] = {
|
||||
0.13, 0.59, 0.95, 1,
|
||||
0.13, 0.59, 0.95, 1,
|
||||
0.13, 0.59, 0.95, 1,
|
||||
0.13, 0.59, 0.95, 1,
|
||||
};
|
||||
float lightblue_bg[16] = {
|
||||
0.89, 0.95, 0.99, 1.00,
|
||||
0.89, 0.95, 0.99, 1.00,
|
||||
0.89, 0.95, 0.99, 1.00,
|
||||
0.89, 0.95, 0.99, 1.00,
|
||||
};
|
||||
float pure_white[16]= {
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1.00, 1.00, 1.00, 1.00,
|
||||
1.00, 1.00, 1.00, 1.00,
|
||||
1.00, 1.00, 1.00, 1.00,
|
||||
1.00, 1.00, 1.00, 1.00,
|
||||
};
|
||||
float white_bg[16]= {
|
||||
0.98, 0.98, 0.98, 1,
|
||||
0.98, 0.98, 0.98, 1,
|
||||
0.98, 0.98, 0.98, 1,
|
||||
0.98, 0.98, 0.98, 1,
|
||||
0.98, 0.98, 0.98, 1.00,
|
||||
0.98, 0.98, 0.98, 1.00,
|
||||
0.98, 0.98, 0.98, 1.00,
|
||||
0.98, 0.98, 0.98, 1.00,
|
||||
};
|
||||
float white_transp_bg[16]= {
|
||||
0.98, 0.98, 0.98, 0.90,
|
||||
@ -755,42 +758,155 @@ static void mui_frame(void *data)
|
||||
0.98, 0.98, 0.98, 0.90,
|
||||
};
|
||||
float grey_bg[16]= {
|
||||
0.78, 0.78, 0.78, 1,
|
||||
0.78, 0.78, 0.78, 1,
|
||||
0.78, 0.78, 0.78, 1,
|
||||
0.78, 0.78, 0.78, 1,
|
||||
0.78, 0.78, 0.78, 0.90,
|
||||
0.78, 0.78, 0.78, 0.90,
|
||||
0.78, 0.78, 0.78, 0.90,
|
||||
0.78, 0.78, 0.78, 0.90,
|
||||
};
|
||||
float shadow_bg[16]= {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0.2,
|
||||
0, 0, 0, 0.2,
|
||||
0.00, 0.00, 0.00, 0.00,
|
||||
0.00, 0.00, 0.00, 0.00,
|
||||
0.00, 0.00, 0.00, 0.2,
|
||||
0.00, 0.00, 0.00, 0.2,
|
||||
};
|
||||
float greyish_blue[16] = {
|
||||
0.22, 0.28, 0.31, 1.00,
|
||||
0.22, 0.28, 0.31, 1.00,
|
||||
0.22, 0.28, 0.31, 1.00,
|
||||
0.22, 0.28, 0.31, 1.00,
|
||||
};
|
||||
float almost_black[16] = {
|
||||
0.13, 0.13, 0.13, 0.90,
|
||||
0.13, 0.13, 0.13, 0.90,
|
||||
0.13, 0.13, 0.13, 0.90,
|
||||
0.13, 0.13, 0.13, 0.90,
|
||||
};
|
||||
|
||||
/* This controls the main background color */
|
||||
menu_display_ctx_clearcolor_t clearcolor;
|
||||
menu_animation_ctx_ticker_t ticker;
|
||||
unsigned width, height, ticker_limit, i;
|
||||
size_t selection;
|
||||
size_t title_margin;
|
||||
menu_display_ctx_draw_t draw;
|
||||
|
||||
/* https://material.google.com/style/color.html#color-color-palette */
|
||||
/* Hex values converted to RGB normalized decimals, alpha set to 1 */
|
||||
float blue_500[16] = {0};
|
||||
float blue_50[16] = {0};
|
||||
float green_500[16] = {0};
|
||||
float green_50[16] = {0};
|
||||
float red_500[16] = {0};
|
||||
float red_50[16] = {0};
|
||||
float yellow_500[16] = {0};
|
||||
float yellow_200[16] = {0};
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
unsigned ticker_limit = 0;
|
||||
unsigned i = 0;
|
||||
unsigned header_height = 0;
|
||||
size_t selection = 0;
|
||||
size_t title_margin = 0;
|
||||
bool display_kb = false;
|
||||
mui_handle_t *mui = (mui_handle_t*)data;
|
||||
uint64_t *frame_count = video_driver_get_frame_count_ptr();
|
||||
char msg[256] = {0};
|
||||
char title[256] = {0};
|
||||
char title_buf[256] = {0};
|
||||
char title_msg[256] = {0};
|
||||
const uint32_t normal_color = 0x212121ff;
|
||||
const uint32_t hover_color = 0x212121ff;
|
||||
const uint32_t title_color = 0xffffffff;
|
||||
const uint32_t activetab_color = 0x0096f2ff;
|
||||
const uint32_t passivetab_color = 0x9e9e9eff;
|
||||
bool background_rendered = false;
|
||||
bool libretro_running = menu_display_libretro_running();
|
||||
|
||||
(void)passivetab_color;
|
||||
(void)activetab_color;
|
||||
/* Default is blue theme */
|
||||
float *header_bg_color = blue_500;
|
||||
float *highlighted_entry_color = blue_50;
|
||||
float *footer_bg_color = white_bg;
|
||||
float *body_bg_color = white_transp_bg;
|
||||
settings_t *settings = config_get_ptr();
|
||||
float *active_tab_marker_color = blue_500;
|
||||
|
||||
uint32_t font_normal_color = 0x212121ff;
|
||||
uint32_t font_hover_color = 0x212121ff;
|
||||
uint32_t font_header_color = 0xffffffff;
|
||||
|
||||
#if 0
|
||||
uint32_t activetab_color = 0x0096f2ff;
|
||||
uint32_t passivetab_color = 0x9e9e9eff;
|
||||
#endif
|
||||
|
||||
if (!mui)
|
||||
return;
|
||||
|
||||
hex32_to_rgba_normalized(0xFFEB3B, yellow_500, 1.00);
|
||||
hex32_to_rgba_normalized(0xFFF59D, yellow_200, 0.90);
|
||||
hex32_to_rgba_normalized(0xF44336, red_500, 1.00);
|
||||
hex32_to_rgba_normalized(0xFFEBEE, red_50, 0.90);
|
||||
hex32_to_rgba_normalized(0x2196F3, blue_500, 1.00);
|
||||
hex32_to_rgba_normalized(0xE3F2FD, blue_50, 0.90);
|
||||
hex32_to_rgba_normalized(0x4CAF50, green_500, 1.00);
|
||||
hex32_to_rgba_normalized(0xE8F5E9, green_50, 0.90);
|
||||
|
||||
clearcolor.r = 1.0f;
|
||||
clearcolor.g = 1.0f;
|
||||
clearcolor.b = 1.0f;
|
||||
clearcolor.a = 0.75f;
|
||||
|
||||
switch (settings->menu.materialui.menu_color_theme)
|
||||
{
|
||||
case MATERIALUI_THEME_BLUE:
|
||||
break;
|
||||
case MATERIALUI_THEME_GREEN:
|
||||
header_bg_color = green_500;
|
||||
body_bg_color = white_transp_bg;
|
||||
highlighted_entry_color = green_50;
|
||||
footer_bg_color = white_bg;
|
||||
active_tab_marker_color = green_500;
|
||||
|
||||
font_normal_color = 0x212121ff;
|
||||
font_hover_color = 0x212121ff;
|
||||
font_header_color = 0xffffffff;
|
||||
break;
|
||||
case MATERIALUI_THEME_RED:
|
||||
header_bg_color = red_500;
|
||||
body_bg_color = white_transp_bg;
|
||||
highlighted_entry_color = red_50;
|
||||
footer_bg_color = white_bg;
|
||||
body_bg_color = white_transp_bg;
|
||||
active_tab_marker_color = red_500;
|
||||
|
||||
font_normal_color = 0x212121ff;
|
||||
font_hover_color = 0x212121ff;
|
||||
font_header_color = 0xffffffff;
|
||||
break;
|
||||
case MATERIALUI_THEME_YELLOW:
|
||||
header_bg_color = yellow_500;
|
||||
body_bg_color = white_transp_bg;
|
||||
body_bg_color = white_transp_bg;
|
||||
highlighted_entry_color = yellow_200;
|
||||
footer_bg_color = white_bg;
|
||||
active_tab_marker_color = yellow_500;
|
||||
|
||||
font_normal_color = 0x212121ff;
|
||||
font_hover_color = 0x212121ff;
|
||||
font_header_color = 0x00000000;
|
||||
break;
|
||||
case MATERIALUI_THEME_DARK_BLUE:
|
||||
header_bg_color = greyish_blue;
|
||||
body_bg_color = almost_black;
|
||||
highlighted_entry_color = grey_bg;
|
||||
footer_bg_color = almost_black;
|
||||
active_tab_marker_color = greyish_blue;
|
||||
|
||||
font_normal_color = 0xffffffff;
|
||||
font_hover_color = 0x00000000;
|
||||
|
||||
/*
|
||||
TODO/FIXME - Maybe make this track the footer's bg color or vice-versa
|
||||
e.g. clearcolor.r = &footer_bg_color[0]; clearcolor.g = &footer_bg_color[4];
|
||||
*/
|
||||
clearcolor.r = 0.13f;
|
||||
clearcolor.g = 0.13f;
|
||||
clearcolor.b = 0.13f;
|
||||
break;
|
||||
}
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
menu_display_set_viewport();
|
||||
@ -803,7 +919,7 @@ static void mui_frame(void *data)
|
||||
draw.width = width;
|
||||
draw.height = height;
|
||||
draw.texture = menu_display_white_texture;
|
||||
draw.color = &white_transp_bg[0];
|
||||
draw.color = &body_bg_color[0];
|
||||
draw.vertex = NULL;
|
||||
draw.tex_coord = NULL;
|
||||
draw.vertex_count = 4;
|
||||
@ -816,13 +932,6 @@ static void mui_frame(void *data)
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_display_ctx_clearcolor_t clearcolor;
|
||||
|
||||
clearcolor.r = 1.0f;
|
||||
clearcolor.g = 1.0f;
|
||||
clearcolor.b = 1.0f;
|
||||
clearcolor.a = 0.75f;
|
||||
|
||||
menu_display_clear_color(&clearcolor);
|
||||
|
||||
if (mui->textures.bg)
|
||||
@ -858,46 +967,69 @@ static void mui_frame(void *data)
|
||||
return;
|
||||
|
||||
if (background_rendered || libretro_running)
|
||||
menu_display_set_alpha(lightblue_bg, 0.75);
|
||||
menu_display_set_alpha(blue_50, 0.75);
|
||||
else
|
||||
menu_display_set_alpha(lightblue_bg, 1.0);
|
||||
menu_display_set_alpha(blue_50, 1.0);
|
||||
|
||||
/* highlighted entry */
|
||||
mui_render_quad(mui, 0,
|
||||
header_height - mui->scroll_y + mui->line_height *
|
||||
selection, width, mui->line_height,
|
||||
width, height,
|
||||
&lightblue_bg[0]);
|
||||
mui_render_quad(
|
||||
mui,
|
||||
0,
|
||||
header_height - mui->scroll_y + mui->line_height *selection,
|
||||
width,
|
||||
mui->line_height,
|
||||
width,
|
||||
height,
|
||||
&highlighted_entry_color[0]
|
||||
);
|
||||
|
||||
menu_display_font_bind_block(&mui->list_block);
|
||||
|
||||
mui_render_menu_list(mui, width, height,
|
||||
normal_color, hover_color, &pure_white[0]);
|
||||
mui_render_menu_list(
|
||||
mui,
|
||||
width,
|
||||
height,
|
||||
font_normal_color,
|
||||
font_hover_color,
|
||||
&pure_white[0]
|
||||
);
|
||||
|
||||
menu_display_font_flush_block();
|
||||
menu_animation_ctl(MENU_ANIMATION_CTL_SET_ACTIVE, NULL);
|
||||
|
||||
/* header */
|
||||
mui_render_quad(mui, 0, 0, width, header_height,
|
||||
width, height, &blue_bg[0]);
|
||||
mui_render_quad(
|
||||
mui,
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
header_height,
|
||||
width,
|
||||
height,
|
||||
&header_bg_color[0]);
|
||||
|
||||
mui->tabs_height = 0;
|
||||
|
||||
/* display tabs if depth equal one, if not hide them */
|
||||
if (mui_list_get_size(mui, MENU_LIST_PLAIN) == 1)
|
||||
{
|
||||
mui_draw_tab_begin(mui, width, height, &white_bg[0], &grey_bg[0]);
|
||||
mui_draw_tab_begin(mui, width, height, &footer_bg_color[0], &grey_bg[0]);
|
||||
|
||||
for (i = 0; i <= MUI_SYSTEM_TAB_END; i++)
|
||||
mui_draw_tab(mui, i, width, height, &pure_white[0]);
|
||||
|
||||
mui_draw_tab_end(mui, width, height, header_height, &blue_bg[0]);
|
||||
mui_draw_tab_end(mui, width, height, header_height, &active_tab_marker_color[0]);
|
||||
}
|
||||
|
||||
mui_render_quad(mui, 0, header_height, width,
|
||||
mui->shadow_height,
|
||||
width, height,
|
||||
&shadow_bg[0]);
|
||||
mui_render_quad(
|
||||
mui,
|
||||
0,
|
||||
header_height,
|
||||
width,
|
||||
mui->shadow_height,
|
||||
width,
|
||||
height,
|
||||
&shadow_bg[0]);
|
||||
|
||||
title_margin = mui->margin;
|
||||
|
||||
@ -905,15 +1037,16 @@ static void mui_frame(void *data)
|
||||
{
|
||||
title_margin = mui->icon_size;
|
||||
mui_draw_icon(
|
||||
mui->icon_size,
|
||||
mui->textures.list[MUI_TEXTURE_BACK],
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
height,
|
||||
0,
|
||||
1,
|
||||
&pure_white[0]);
|
||||
mui->icon_size,
|
||||
mui->textures.list[MUI_TEXTURE_BACK],
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
height,
|
||||
0,
|
||||
1,
|
||||
&pure_white[0]
|
||||
);
|
||||
}
|
||||
|
||||
ticker_limit = (width - mui->margin*2) / mui->glyph_width;
|
||||
@ -951,7 +1084,7 @@ static void mui_frame(void *data)
|
||||
}
|
||||
|
||||
mui_draw_text(title_margin, header_height / 2, width, height,
|
||||
title_buf, title_color, TEXT_ALIGN_LEFT);
|
||||
title_buf, font_header_color, TEXT_ALIGN_LEFT);
|
||||
|
||||
mui_draw_scrollbar(mui, width, height, &grey_bg[0]);
|
||||
|
||||
|
@ -312,7 +312,7 @@ float gradient_dark[16] = {
|
||||
const char *xmb_theme_ident(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
switch (settings->menu.xmb_theme)
|
||||
switch (settings->menu.xmb.theme)
|
||||
{
|
||||
case 1:
|
||||
return "flatui";
|
||||
@ -355,7 +355,7 @@ static float *xmb_gradient_ident(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
switch (settings->menu.background_gradient)
|
||||
switch (settings->menu.xmb.menu_color_theme)
|
||||
{
|
||||
case 1:
|
||||
return &gradient_dark_purple[0];
|
||||
@ -497,7 +497,7 @@ static void xmb_draw_icon(
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
if (settings->menu.xmb_shadows_enable)
|
||||
if (settings->menu.xmb.shadows_enable)
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
shadow[i] = 0;
|
||||
@ -554,7 +554,7 @@ static void xmb_draw_thumbnail(xmb_handle_t *xmb, float *color,
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
if (settings->menu.xmb_shadows_enable)
|
||||
if (settings->menu.xmb.shadows_enable)
|
||||
{
|
||||
for (i = 0; i < 16; i++)
|
||||
shadow[i] = 0;
|
||||
@ -569,6 +569,7 @@ static void xmb_draw_thumbnail(xmb_handle_t *xmb, float *color,
|
||||
}
|
||||
|
||||
coords.color = (const float*)color;
|
||||
menu_display_set_alpha((float*)coords.color, 1.0f);
|
||||
draw.x = x;
|
||||
draw.y = height - y;
|
||||
|
||||
@ -607,7 +608,7 @@ static void xmb_draw_text(xmb_handle_t *xmb,
|
||||
params.full_screen = true;
|
||||
params.text_align = text_align;
|
||||
|
||||
if (settings->menu.xmb_shadows_enable)
|
||||
if (settings->menu.xmb.shadows_enable)
|
||||
{
|
||||
params.drop_x = xmb->shadow_offset;
|
||||
params.drop_y = -xmb->shadow_offset;
|
||||
@ -1270,8 +1271,8 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb)
|
||||
info.list = xmb->horizontal_list;
|
||||
info.menu_list = NULL;
|
||||
info.type = 0;
|
||||
info.flags = 0;
|
||||
info.type_default = FILE_TYPE_PLAIN;
|
||||
info.flags = SL_FLAG_ALLOW_EMPTY_LIST;
|
||||
info.enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST;
|
||||
strlcpy(info.label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST),
|
||||
@ -1924,7 +1925,7 @@ static void xmb_draw_bg(
|
||||
menu_display_set_viewport();
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
if (settings->menu.shader_pipeline > 0)
|
||||
if (settings->menu.xmb.shader_pipeline > 0)
|
||||
{
|
||||
draw.color = xmb_gradient_ident();
|
||||
|
||||
@ -1936,7 +1937,7 @@ static void xmb_draw_bg(
|
||||
menu_display_draw_gradient(&draw);
|
||||
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_SEC;
|
||||
if (settings->menu.shader_pipeline == 2)
|
||||
if (settings->menu.xmb.shader_pipeline == 2)
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU;
|
||||
|
||||
menu_display_draw_pipeline(&draw);
|
||||
@ -2027,7 +2028,7 @@ static void xmb_frame(void *data)
|
||||
}
|
||||
|
||||
menu_display_set_alpha(coord_black, MIN(
|
||||
(float)settings->menu.xmb_alpha_factor/100, xmb->alpha));
|
||||
(float)settings->menu.xmb.alpha_factor/100, xmb->alpha));
|
||||
menu_display_set_alpha(coord_white, xmb->alpha);
|
||||
|
||||
xmb_draw_bg(
|
||||
@ -2258,7 +2259,7 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
|
||||
float scale_factor;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
scale_factor = (settings->menu.xmb_scale_factor * width) / (1920.0 * 100);
|
||||
scale_factor = (settings->menu.xmb.scale_factor * width) / (1920.0 * 100);
|
||||
|
||||
xmb->above_subitem_offset = 1.5;
|
||||
xmb->above_item_offset = -1.0;
|
||||
@ -2306,7 +2307,7 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
||||
float scale_factor;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
scale_factor = ((settings->menu.xmb_scale_factor * width) / (1920.0 * 100)) * 1.5;
|
||||
scale_factor = ((settings->menu.xmb.scale_factor * width) / (1920.0 * 100)) * 1.5;
|
||||
|
||||
xmb->above_subitem_offset = 1.5;
|
||||
xmb->above_item_offset = -1.0;
|
||||
|
@ -209,7 +209,7 @@ static bool zarch_zui_check_button_down(zui_t *zui,
|
||||
hitbox.y1 = y1;
|
||||
hitbox.y2 = y2;
|
||||
|
||||
if (menu_input_ctl(MENU_INPUT_CTL_CHECK_INSIDE_HITBOX, &hitbox))
|
||||
if (menu_input_mouse_check_vector_inside_hitbox(&hitbox))
|
||||
zui->item.hot = id;
|
||||
|
||||
if ( zui->item.hot == id
|
||||
@ -233,7 +233,7 @@ static bool zarch_zui_check_button_up(zui_t *zui,
|
||||
hitbox.y1 = y1;
|
||||
hitbox.y2 = y2;
|
||||
|
||||
if (menu_input_ctl(MENU_INPUT_CTL_CHECK_INSIDE_HITBOX, &hitbox))
|
||||
if (menu_input_mouse_check_vector_inside_hitbox(&hitbox))
|
||||
zui->item.hot = id;
|
||||
|
||||
if ( zui->item.active == id
|
||||
|
@ -118,7 +118,7 @@ void menu_cbs_init(void *data,
|
||||
|
||||
menu_cbs_init_log(repr_label, "REFRESH", cbs->action_refresh_ident);
|
||||
|
||||
menu_cbs_init_bind_get_string_representation(cbs, path, label, type, idx, label_hash, menu_label_hash);
|
||||
menu_cbs_init_bind_get_string_representation(cbs, path, label, type, idx);
|
||||
|
||||
menu_cbs_init_log(repr_label, "GET VALUE", cbs->action_get_value_ident);
|
||||
|
||||
@ -136,7 +136,6 @@ void menu_cbs_init(void *data,
|
||||
bind_info.type = type;
|
||||
bind_info.idx = idx;
|
||||
bind_info.label_hash = label_hash;
|
||||
bind_info.menu_label_hash = menu_label_hash;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_BIND_INIT, &bind_info);
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ enum
|
||||
ACTION_OK_DL_DEFAULT = 0,
|
||||
ACTION_OK_DL_OPEN_ARCHIVE,
|
||||
ACTION_OK_DL_OPEN_ARCHIVE_DETECT_CORE,
|
||||
ACTION_OK_DL_SCAN_DIR_LIST,
|
||||
ACTION_OK_DL_HELP,
|
||||
ACTION_OK_DL_RPL_ENTRY,
|
||||
ACTION_OK_DL_RDB_ENTRY,
|
||||
@ -37,7 +38,7 @@ enum
|
||||
ACTION_OK_DL_SHADER_PRESET,
|
||||
ACTION_OK_DL_GENERIC,
|
||||
ACTION_OK_DL_PUSH_DEFAULT,
|
||||
ACTION_OK_DL_DOWNLOADS_DIR,
|
||||
ACTION_OK_DL_FILE_BROWSER_SELECT_DIR,
|
||||
ACTION_OK_DL_INPUT_SETTINGS_LIST,
|
||||
ACTION_OK_DL_DRIVER_SETTINGS_LIST,
|
||||
ACTION_OK_DL_VIDEO_SETTINGS_LIST,
|
||||
@ -104,7 +105,7 @@ int shader_action_parameter_right(unsigned type, const char *label, bool wraparo
|
||||
int shader_action_parameter_preset_right(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
int generic_action_ok_displaylist_push(const char *path,
|
||||
int generic_action_ok_displaylist_push(const char *path, const char *new_path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx,
|
||||
unsigned action_type);
|
||||
|
||||
@ -145,8 +146,7 @@ int menu_cbs_init_bind_refresh(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx);
|
||||
|
||||
int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
const char *path, const char *label, unsigned type, size_t idx);
|
||||
|
||||
int menu_cbs_init_bind_label(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx);
|
||||
|
@ -476,6 +476,16 @@ void menu_display_draw(menu_display_ctx_draw_t *draw)
|
||||
menu_disp->draw(draw);
|
||||
}
|
||||
|
||||
bool menu_display_shader_pipeline_active(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!string_is_equal(menu_driver_ident(), "xmb"))
|
||||
return false;
|
||||
if (settings->menu.xmb.shader_pipeline == 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw)
|
||||
{
|
||||
if (!menu_disp || !draw || !menu_disp->draw_pipeline)
|
||||
@ -488,6 +498,7 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw)
|
||||
static struct video_coords coords;
|
||||
const float *new_vertex = NULL;
|
||||
const float *new_tex_coord = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!menu_disp || !draw)
|
||||
return;
|
||||
|
||||
@ -507,6 +518,9 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw)
|
||||
|
||||
draw->coords = &coords;
|
||||
|
||||
if (!menu_display_libretro_running() && !menu_display_shader_pipeline_active())
|
||||
menu_display_set_alpha(draw->color, settings->menu.wallpaper.opacity);
|
||||
|
||||
if (!draw->texture)
|
||||
draw->texture = menu_display_white_texture;
|
||||
|
||||
|
@ -29,6 +29,15 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum materialui_color_theme
|
||||
{
|
||||
MATERIALUI_THEME_BLUE = 0,
|
||||
MATERIALUI_THEME_GREEN,
|
||||
MATERIALUI_THEME_RED,
|
||||
MATERIALUI_THEME_YELLOW,
|
||||
MATERIALUI_THEME_DARK_BLUE
|
||||
};
|
||||
|
||||
enum menu_display_prim_type
|
||||
{
|
||||
MENU_DISPLAY_PRIM_NONE = 0,
|
||||
@ -201,6 +210,8 @@ void menu_display_draw_cursor(
|
||||
void menu_display_draw_text(const char *msg, int width, int height,
|
||||
struct font_params *params);
|
||||
|
||||
bool menu_display_shader_pipeline_active(void);
|
||||
|
||||
void menu_display_set_alpha(float *color, float alpha_value);
|
||||
|
||||
bool menu_display_font(enum application_special_type type);
|
||||
|
@ -3136,8 +3136,6 @@ static int menu_displaylist_parse_options_remappings(
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
return -1;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||
|
||||
for (p = 0; p < settings->input.max_users; p++)
|
||||
{
|
||||
char key_type[PATH_MAX_LENGTH] = {0};
|
||||
@ -3170,6 +3168,8 @@ static int menu_displaylist_parse_options_remappings(
|
||||
MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||
|
||||
if (system)
|
||||
{
|
||||
for (p = 0; p < settings->input.max_users; p++)
|
||||
@ -3204,18 +3204,114 @@ static int menu_displaylist_parse_options_remappings(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_displaylist_parse_generic(
|
||||
menu_displaylist_info_t *info, bool horizontal)
|
||||
enum filebrowser_enums
|
||||
{
|
||||
FILEBROWSER_NONE = 0,
|
||||
FILEBROWSER_SELECT_DIR,
|
||||
FILEBROWSER_SCAN_DIR,
|
||||
FILEBROWSER_SELECT_COLLECTION
|
||||
};
|
||||
|
||||
static unsigned filebrowser_types = 0;
|
||||
|
||||
static int menu_displaylist_parse_playlists_horizontal(
|
||||
menu_displaylist_info_t *info)
|
||||
{
|
||||
bool path_is_compressed, push_dir, filter_ext;
|
||||
size_t i, list_size;
|
||||
struct string_list *str_list = NULL;
|
||||
core_info_list_t *list = NULL;
|
||||
unsigned items_found = 0;
|
||||
|
||||
if (!*info->path)
|
||||
{
|
||||
if (frontend_driver_parse_drive_list(info->list) != 0)
|
||||
menu_entries_add_enum(info->list, "/", "",
|
||||
MSG_UNKNOWN, FILE_TYPE_DIRECTORY, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
str_list = dir_list_new(info->path, NULL, true, true);
|
||||
|
||||
if (!str_list)
|
||||
{
|
||||
const char *str = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND);
|
||||
(void)str;
|
||||
return 0;
|
||||
}
|
||||
|
||||
dir_list_sort(str_list, true);
|
||||
|
||||
list_size = str_list->size;
|
||||
|
||||
if (list_size == 0)
|
||||
{
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS),
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_NO_ITEM, 0, 0);
|
||||
|
||||
string_list_free(str_list);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < list_size; i++)
|
||||
{
|
||||
char label[PATH_MAX_LENGTH] = {0};
|
||||
const char *path = NULL;
|
||||
enum msg_file_type file_type = FILE_TYPE_NONE;
|
||||
|
||||
switch (str_list->elems[i].attr.i)
|
||||
{
|
||||
case RARCH_DIRECTORY:
|
||||
file_type = FILE_TYPE_DIRECTORY;
|
||||
break;
|
||||
case RARCH_PLAIN_FILE:
|
||||
default:
|
||||
file_type = (enum msg_file_type)info->type_default;
|
||||
break;
|
||||
}
|
||||
|
||||
if (file_type == FILE_TYPE_DIRECTORY)
|
||||
continue;
|
||||
|
||||
file_type = FILE_TYPE_PLAYLIST_COLLECTION;
|
||||
/* Need to preserve slash first time. */
|
||||
path = str_list->elems[i].data;
|
||||
|
||||
if (*info->path)
|
||||
path = path_basename(path);
|
||||
|
||||
items_found++;
|
||||
menu_entries_add_enum(info->list, path, label,
|
||||
MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY,
|
||||
file_type, 0, 0);
|
||||
}
|
||||
|
||||
string_list_free(str_list);
|
||||
|
||||
if (items_found == 0)
|
||||
{
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS),
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_NO_ITEM, 0, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_displaylist_parse_generic(
|
||||
menu_displaylist_info_t *info,
|
||||
enum menu_displaylist_ctl_state type)
|
||||
{
|
||||
size_t i, list_size;
|
||||
bool path_is_compressed = false;
|
||||
bool filter_ext = false;
|
||||
struct string_list *str_list = NULL;
|
||||
unsigned items_found = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
uint32_t hash_label = msg_hash_calculate(info->label);
|
||||
|
||||
core_info_get_list(&list);
|
||||
|
||||
if (!*info->path)
|
||||
{
|
||||
@ -3226,8 +3322,6 @@ static int menu_displaylist_parse_generic(
|
||||
}
|
||||
|
||||
path_is_compressed = path_is_compressed_file(info->path);
|
||||
push_dir =
|
||||
(menu_setting_get_browser_selection_type(info->setting) == ST_DIR);
|
||||
filter_ext =
|
||||
settings->menu.navigation.browser.filter.supported_extensions_enable;
|
||||
|
||||
@ -3241,26 +3335,26 @@ static int menu_displaylist_parse_generic(
|
||||
filter_ext ? info->exts : NULL,
|
||||
true, true);
|
||||
|
||||
if (string_is_equal(info->label, msg_hash_to_str(MENU_ENUM_LABEL_SCAN_DIRECTORY)))
|
||||
if (BIT32_GET(filebrowser_types, FILEBROWSER_SCAN_DIR))
|
||||
menu_entries_prepend(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_THIS_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SCAN_THIS_DIRECTORY),
|
||||
MENU_ENUM_LABEL_SCAN_THIS_DIRECTORY,
|
||||
FILE_TYPE_SCAN_DIRECTORY, 0 ,0);
|
||||
|
||||
if (push_dir)
|
||||
if (BIT32_GET(filebrowser_types, FILEBROWSER_SELECT_DIR))
|
||||
menu_entries_prepend(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_USE_THIS_DIRECTORY),
|
||||
MENU_ENUM_LABEL_USE_THIS_DIRECTORY,
|
||||
FILE_TYPE_USE_DIRECTORY, 0 ,0);
|
||||
|
||||
if (!horizontal && hash_label != MENU_LABEL_CORE_LIST)
|
||||
if (type == DISPLAYLIST_CORES)
|
||||
{
|
||||
char out_dir[PATH_MAX_LENGTH] = {0};
|
||||
fill_pathname_parent_dir(out_dir, info->path, sizeof(out_dir));
|
||||
|
||||
if (!string_is_empty(out_dir))
|
||||
if (string_is_empty(out_dir))
|
||||
{
|
||||
menu_entries_prepend(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY),
|
||||
@ -3276,9 +3370,8 @@ static int menu_displaylist_parse_generic(
|
||||
? msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNABLE_TO_READ_COMPRESSED_FILE)
|
||||
: msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND);
|
||||
|
||||
if (! horizontal)
|
||||
menu_entries_add_enum(info->list, str, "",
|
||||
MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND, 0, 0, 0);
|
||||
menu_entries_add_enum(info->list, str, "",
|
||||
MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -3288,22 +3381,19 @@ static int menu_displaylist_parse_generic(
|
||||
|
||||
if (list_size == 0)
|
||||
{
|
||||
if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST))
|
||||
{
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS),
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_NO_ITEM, 0, 0);
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS),
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_NO_ITEM, 0, 0);
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (hash_label == MENU_LABEL_CORE_LIST)
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST),
|
||||
MENU_ENUM_LABEL_CORE_UPDATER_LIST,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
if (type == DISPLAYLIST_CORES)
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST),
|
||||
MENU_ENUM_LABEL_CORE_UPDATER_LIST,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
string_list_free(str_list);
|
||||
|
||||
@ -3330,20 +3420,17 @@ static int menu_displaylist_parse_generic(
|
||||
break;
|
||||
case RARCH_PLAIN_FILE:
|
||||
default:
|
||||
switch (hash_label)
|
||||
file_type = (enum msg_file_type)info->type_default;
|
||||
switch (type)
|
||||
{
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
case DISPLAYLIST_CORES_DETECTED:
|
||||
/* in case of deferred_core_list we have to interpret
|
||||
* every archive as an archive to disallow instant loading
|
||||
*/
|
||||
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 = FILE_TYPE_CARCHIVE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
file_type = (enum msg_file_type)info->type_default;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -3353,7 +3440,9 @@ static int menu_displaylist_parse_generic(
|
||||
|
||||
if (!is_dir)
|
||||
{
|
||||
if (push_dir || hash_label == MENU_LABEL_SCAN_DIRECTORY)
|
||||
if (BIT32_GET(filebrowser_types, FILEBROWSER_SELECT_DIR))
|
||||
continue;
|
||||
if (BIT32_GET(filebrowser_types, FILEBROWSER_SCAN_DIR))
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3363,41 +3452,36 @@ static int menu_displaylist_parse_generic(
|
||||
if (*info->path && !path_is_compressed)
|
||||
path = path_basename(path);
|
||||
|
||||
/* Push type further down in the chain.
|
||||
* Needed for shader manager currently. */
|
||||
switch (hash_label)
|
||||
if (type == DISPLAYLIST_CORES)
|
||||
{
|
||||
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
||||
if (is_dir && !horizontal)
|
||||
file_type = FILE_TYPE_DIRECTORY;
|
||||
else if (is_dir && horizontal)
|
||||
continue;
|
||||
else
|
||||
file_type = FILE_TYPE_PLAYLIST_COLLECTION;
|
||||
break;
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
#ifndef HAVE_DYNAMIC
|
||||
if (frontend_driver_has_fork())
|
||||
if (frontend_driver_has_fork())
|
||||
{
|
||||
char salamander_name[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
if (frontend_driver_get_salamander_basename(
|
||||
salamander_name, sizeof(salamander_name)))
|
||||
{
|
||||
char salamander_name[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
if (frontend_driver_get_salamander_basename(
|
||||
salamander_name, sizeof(salamander_name)))
|
||||
{
|
||||
if (string_is_equal_noncase(path, salamander_name))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_dir)
|
||||
if (string_is_equal_noncase(path, salamander_name))
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
/* Compressed cores are unsupported */
|
||||
if (file_type == FILE_TYPE_CARCHIVE)
|
||||
continue;
|
||||
|
||||
file_type = is_dir ? FILE_TYPE_DIRECTORY : FILE_TYPE_CORE;
|
||||
break;
|
||||
if (is_dir)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
/* Compressed cores are unsupported */
|
||||
if (file_type == FILE_TYPE_CARCHIVE)
|
||||
continue;
|
||||
|
||||
file_type = is_dir ? FILE_TYPE_DIRECTORY : FILE_TYPE_CORE;
|
||||
}
|
||||
else if (BIT32_GET(filebrowser_types, FILEBROWSER_SELECT_COLLECTION))
|
||||
{
|
||||
if (is_dir)
|
||||
file_type = FILE_TYPE_DIRECTORY;
|
||||
else
|
||||
file_type = FILE_TYPE_PLAYLIST_COLLECTION;
|
||||
}
|
||||
|
||||
if (settings->multimedia.builtin_mediaplayer_enable ||
|
||||
@ -3420,9 +3504,12 @@ static int menu_displaylist_parse_generic(
|
||||
case RARCH_CONTENT_IMAGE:
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
if (settings->multimedia.builtin_imageviewer_enable
|
||||
&& hash_label != MENU_LABEL_MENU_WALLPAPER)
|
||||
&& type != DISPLAYLIST_IMAGES)
|
||||
file_type = FILE_TYPE_IMAGEVIEWER;
|
||||
else
|
||||
file_type = FILE_TYPE_IMAGE;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -3438,52 +3525,48 @@ static int menu_displaylist_parse_generic(
|
||||
|
||||
if (items_found == 0)
|
||||
{
|
||||
if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST))
|
||||
{
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS),
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_NO_ITEM, 0, 0);
|
||||
}
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS),
|
||||
MENU_ENUM_LABEL_NO_ITEMS,
|
||||
MENU_SETTING_NO_ITEM, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (hash_label)
|
||||
if (type == DISPLAYLIST_CORES)
|
||||
{
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
{
|
||||
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
||||
const char *dir = NULL;
|
||||
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
||||
core_info_list_t *list = NULL;
|
||||
const char *dir = NULL;
|
||||
|
||||
menu_entries_get_last_stack(&dir, NULL, NULL, &enum_idx, NULL);
|
||||
core_info_get_list(&list);
|
||||
|
||||
list_size = file_list_get_size(info->list);
|
||||
menu_entries_get_last_stack(&dir, NULL, NULL, &enum_idx, NULL);
|
||||
|
||||
for (i = 0; i < list_size; i++)
|
||||
{
|
||||
char core_path[PATH_MAX_LENGTH] = {0};
|
||||
char display_name[PATH_MAX_LENGTH] = {0};
|
||||
unsigned type = 0;
|
||||
const char *path = NULL;
|
||||
list_size = file_list_get_size(info->list);
|
||||
|
||||
menu_entries_get_at_offset(info->list,
|
||||
i, &path, NULL, &type, NULL,
|
||||
NULL);
|
||||
for (i = 0; i < list_size; i++)
|
||||
{
|
||||
char core_path[PATH_MAX_LENGTH] = {0};
|
||||
char display_name[PATH_MAX_LENGTH] = {0};
|
||||
unsigned type = 0;
|
||||
const char *path = NULL;
|
||||
|
||||
if (type != FILE_TYPE_CORE)
|
||||
continue;
|
||||
menu_entries_get_at_offset(info->list,
|
||||
i, &path, NULL, &type, NULL,
|
||||
NULL);
|
||||
|
||||
fill_pathname_join(core_path, dir, path, sizeof(core_path));
|
||||
if (type != FILE_TYPE_CORE)
|
||||
continue;
|
||||
|
||||
if (core_info_list_get_display_name(list,
|
||||
core_path, display_name, sizeof(display_name)))
|
||||
menu_entries_set_alt_at_offset(info->list, i, display_name);
|
||||
}
|
||||
info->need_sort = true;
|
||||
}
|
||||
break;
|
||||
fill_pathname_join(core_path, dir, path, sizeof(core_path));
|
||||
|
||||
if (core_info_list_get_display_name(list,
|
||||
core_path, display_name, sizeof(display_name)))
|
||||
menu_entries_set_alt_at_offset(info->list, i, display_name);
|
||||
}
|
||||
info->need_sort = true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -3699,6 +3782,11 @@ static bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry)
|
||||
return true;
|
||||
}
|
||||
|
||||
void menu_displaylist_reset_filebrowser(void)
|
||||
{
|
||||
BIT32_CLEAR_ALL(filebrowser_types);
|
||||
}
|
||||
|
||||
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
{
|
||||
size_t i;
|
||||
@ -3828,6 +3916,24 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
break;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DISPLAYLIST_FILE_BROWSER_SCAN_DIR:
|
||||
BIT32_CLEAR_ALL(filebrowser_types);
|
||||
BIT32_SET(filebrowser_types, FILEBROWSER_SCAN_DIR);
|
||||
break;
|
||||
case DISPLAYLIST_FILE_BROWSER_SELECT_DIR:
|
||||
BIT32_CLEAR_ALL(filebrowser_types);
|
||||
BIT32_SET(filebrowser_types, FILEBROWSER_SELECT_DIR);
|
||||
break;
|
||||
case DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION:
|
||||
BIT32_CLEAR_ALL(filebrowser_types);
|
||||
BIT32_SET(filebrowser_types, FILEBROWSER_SELECT_COLLECTION);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DISPLAYLIST_NONE:
|
||||
@ -3836,6 +3942,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_entries_add_enum(info->list, info->path,
|
||||
info->label, MSG_UNKNOWN, info->type, info->directory_ptr, 0);
|
||||
break;
|
||||
case DISPLAYLIST_FILE_BROWSER_SCAN_DIR:
|
||||
case DISPLAYLIST_FILE_BROWSER_SELECT_DIR:
|
||||
case DISPLAYLIST_FILE_BROWSER_SELECT_FILE:
|
||||
case DISPLAYLIST_FILE_BROWSER_SELECT_CORE:
|
||||
case DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION:
|
||||
case DISPLAYLIST_GENERIC:
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
@ -4066,8 +4177,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
|
||||
for (i = 0; i < RARCH_BIND_LIST_END; i++)
|
||||
{
|
||||
ret = menu_displaylist_parse_settings(menu, info,
|
||||
input_config_bind_map_get_base(i), PARSE_ONLY_BIND, false);
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN + i,
|
||||
PARSE_ONLY_BIND, false);
|
||||
(void)ret;
|
||||
}
|
||||
}
|
||||
@ -4249,6 +4361,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_DYNAMIC_WALLPAPER,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY,
|
||||
PARSE_ONLY_FLOAT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_PAUSE_LIBRETRO,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
@ -4304,7 +4419,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
MENU_ENUM_LABEL_XMB_RIBBON_ENABLE,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_XMB_GRADIENT,
|
||||
MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN,
|
||||
@ -5267,6 +5385,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
strlcpy(info->exts,
|
||||
file_path_str(FILE_PATH_RDB_EXTENSION),
|
||||
sizeof(info->exts));
|
||||
info->enum_idx = MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST;
|
||||
strlcpy(info->path, settings->path.content_database, sizeof(info->path));
|
||||
break;
|
||||
case DISPLAYLIST_ARCHIVE_ACTION:
|
||||
@ -5371,8 +5490,15 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DISPLAYLIST_DATABASES:
|
||||
case DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL:
|
||||
if (menu_displaylist_parse_playlists_horizontal(info) == 0)
|
||||
{
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
}
|
||||
break;
|
||||
case DISPLAYLIST_DEFAULT:
|
||||
case DISPLAYLIST_DATABASES:
|
||||
case DISPLAYLIST_CORES:
|
||||
case DISPLAYLIST_CORES_DETECTED:
|
||||
case DISPLAYLIST_SHADER_PASS:
|
||||
@ -5389,16 +5515,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_RECORD_CONFIG_FILES:
|
||||
case DISPLAYLIST_CONFIG_FILES:
|
||||
case DISPLAYLIST_CONTENT_HISTORY:
|
||||
case DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL:
|
||||
if (menu_displaylist_parse_generic(info, type) == 0)
|
||||
{
|
||||
bool horizontal =
|
||||
(type == DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL);
|
||||
|
||||
if (menu_displaylist_parse_generic(info, horizontal) == 0)
|
||||
{
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
}
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -64,6 +64,11 @@ enum menu_displaylist_ctl_state
|
||||
DISPLAYLIST_HISTORY,
|
||||
DISPLAYLIST_PLAYLIST_COLLECTION,
|
||||
DISPLAYLIST_DEFAULT,
|
||||
DISPLAYLIST_FILE_BROWSER_SELECT_DIR,
|
||||
DISPLAYLIST_FILE_BROWSER_SCAN_DIR,
|
||||
DISPLAYLIST_FILE_BROWSER_SELECT_FILE,
|
||||
DISPLAYLIST_FILE_BROWSER_SELECT_CORE,
|
||||
DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION,
|
||||
DISPLAYLIST_CORES,
|
||||
DISPLAYLIST_CORES_SUPPORTED,
|
||||
DISPLAYLIST_CORES_COLLECTION_SUPPORTED,
|
||||
@ -185,6 +190,8 @@ typedef struct menu_displaylist_ctx_entry
|
||||
file_list_t *list;
|
||||
} menu_displaylist_ctx_entry_t;
|
||||
|
||||
void menu_displaylist_reset_filebrowser(void);
|
||||
|
||||
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
@ -64,6 +64,19 @@ static const menu_ctx_driver_t *menu_ctx_drivers[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct retro_system_info menu_driver_system;
|
||||
static bool menu_driver_pending_quick_menu = false;
|
||||
static bool menu_driver_prevent_populate = false;
|
||||
static bool menu_driver_load_no_content = false;
|
||||
static bool menu_driver_alive = false;
|
||||
static bool menu_driver_data_own = false;
|
||||
static bool menu_driver_pending_quit = false;
|
||||
static bool menu_driver_pending_shutdown = false;
|
||||
static playlist_t *menu_driver_playlist = NULL;
|
||||
static struct video_shader *menu_driver_shader = NULL;
|
||||
static menu_handle_t *menu_driver_data = NULL;
|
||||
static const menu_ctx_driver_t *menu_driver_ctx = NULL;
|
||||
static void *menu_userdata = NULL;
|
||||
|
||||
/**
|
||||
* menu_driver_find_handle:
|
||||
@ -193,8 +206,6 @@ static bool menu_init(menu_handle_t *menu_data)
|
||||
return true;
|
||||
}
|
||||
|
||||
static menu_ctx_iterate_t pending_iter;
|
||||
|
||||
static void menu_input_key_event(bool down, unsigned keycode,
|
||||
uint32_t character, uint16_t mod)
|
||||
{
|
||||
@ -263,23 +274,17 @@ static void menu_driver_toggle(bool latch)
|
||||
input_driver_set_flushing_input();
|
||||
}
|
||||
|
||||
const char *menu_driver_ident(void)
|
||||
{
|
||||
if (!menu_driver_alive)
|
||||
return NULL;
|
||||
if (!menu_driver_ctx || !menu_driver_ctx->ident)
|
||||
return NULL;
|
||||
return menu_driver_ctx->ident;
|
||||
}
|
||||
|
||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
{
|
||||
static struct retro_system_info menu_driver_system;
|
||||
static bool menu_driver_pending_quick_menu = false;
|
||||
static bool menu_driver_prevent_populate = false;
|
||||
static bool menu_driver_load_no_content = false;
|
||||
static bool menu_driver_alive = false;
|
||||
static bool menu_driver_data_own = false;
|
||||
static bool menu_driver_pending_quit = false;
|
||||
static bool menu_driver_pending_shutdown = false;
|
||||
static playlist_t *menu_driver_playlist = NULL;
|
||||
static struct video_shader *menu_driver_shader = NULL;
|
||||
static menu_handle_t *menu_driver_data = NULL;
|
||||
static const menu_ctx_driver_t *menu_driver_ctx = NULL;
|
||||
static void *menu_userdata = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case RARCH_MENU_CTL_DRIVER_DATA_GET:
|
||||
@ -548,28 +553,31 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
menu_driver_data = NULL;
|
||||
break;
|
||||
case RARCH_MENU_CTL_INIT:
|
||||
if (menu_driver_data)
|
||||
return true;
|
||||
|
||||
menu_driver_data = (menu_handle_t*)
|
||||
menu_driver_ctx->init(&menu_userdata);
|
||||
|
||||
if (!menu_driver_data || !menu_init(menu_driver_data))
|
||||
{
|
||||
retroarch_fail(1, "init_menu()");
|
||||
return false;
|
||||
}
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (menu_driver_data)
|
||||
return true;
|
||||
|
||||
strlcpy(settings->menu.driver, menu_driver_ctx->ident,
|
||||
sizeof(settings->menu.driver));
|
||||
menu_driver_data = (menu_handle_t*)
|
||||
menu_driver_ctx->init(&menu_userdata);
|
||||
|
||||
if (menu_driver_ctx->lists_init)
|
||||
{
|
||||
if (!menu_driver_ctx->lists_init(menu_driver_data))
|
||||
if (!menu_driver_data || !menu_init(menu_driver_data))
|
||||
{
|
||||
retroarch_fail(1, "init_menu()");
|
||||
return false;
|
||||
}
|
||||
|
||||
strlcpy(settings->menu.driver, menu_driver_ctx->ident,
|
||||
sizeof(settings->menu.driver));
|
||||
|
||||
if (menu_driver_ctx->lists_init)
|
||||
{
|
||||
if (!menu_driver_ctx->lists_init(menu_driver_data))
|
||||
{
|
||||
retroarch_fail(1, "init_menu()");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_LOAD_NO_CONTENT_GET:
|
||||
@ -813,7 +821,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
menu_entries_flush_stack(NULL, MENU_SETTINGS);
|
||||
menu_display_set_msg_force(true);
|
||||
|
||||
generic_action_ok_displaylist_push("",
|
||||
generic_action_ok_displaylist_push("", NULL,
|
||||
"", 0, 0, 0, ACTION_OK_DL_CONTENT_SETTINGS);
|
||||
|
||||
if (menu_driver_ctl(RARCH_MENU_CTL_IS_PENDING_QUIT, NULL))
|
||||
|
@ -379,7 +379,6 @@ typedef struct menu_ctx_bind
|
||||
unsigned type;
|
||||
size_t idx;
|
||||
uint32_t label_hash;
|
||||
uint32_t menu_label_hash;
|
||||
int retcode;
|
||||
} menu_ctx_bind_t;
|
||||
|
||||
@ -415,6 +414,8 @@ const char* config_get_menu_driver_options(void);
|
||||
/* HACK */
|
||||
extern unsigned int rdb_entry_start_game_selection_ptr;
|
||||
|
||||
const char *menu_driver_ident(void);
|
||||
|
||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data);
|
||||
|
||||
extern menu_ctx_driver_t menu_ctx_xui;
|
||||
|
@ -111,7 +111,10 @@ typedef struct menu_file_list_cbs
|
||||
int (*action_up)(unsigned type, const char *label);
|
||||
const char *action_up_ident;
|
||||
|
||||
int (*action_label)(char *s, size_t len);
|
||||
int (*action_label)(file_list_t *list,
|
||||
unsigned type, unsigned i,
|
||||
const char *label, const char *path,
|
||||
char *s, size_t len);
|
||||
const char *action_label_ident;
|
||||
|
||||
int (*action_down)(unsigned type, const char *label);
|
||||
|
@ -290,23 +290,25 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
|
||||
|
||||
if (cbs)
|
||||
{
|
||||
const char *label = NULL;
|
||||
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
||||
|
||||
entry->enum_idx = cbs->enum_idx;
|
||||
|
||||
if (cbs->action_get_value && use_representation)
|
||||
{
|
||||
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
|
||||
const char *label = NULL;
|
||||
menu_entries_get_last_stack(NULL, &label, NULL, &enum_idx, NULL);
|
||||
menu_entries_get_last_stack(NULL, &label, NULL, &enum_idx, NULL);
|
||||
|
||||
if (cbs->action_get_value && use_representation)
|
||||
cbs->action_get_value(list,
|
||||
&entry->spacing, entry->type, i, label,
|
||||
entry->value, sizeof(entry->value),
|
||||
entry_label, path,
|
||||
entry->path, sizeof(entry->path));
|
||||
}
|
||||
|
||||
if (cbs->action_label)
|
||||
cbs->action_label(entry->rich_label,
|
||||
cbs->action_label(list,
|
||||
entry->type, i,
|
||||
label, path,
|
||||
entry->rich_label,
|
||||
sizeof(entry->rich_label));
|
||||
}
|
||||
|
||||
|
@ -609,6 +609,20 @@ static bool menu_input_key_bind_iterate(char *s, size_t len)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_input_mouse_check_vector_inside_hitbox(menu_input_ctx_hitbox_t *hitbox)
|
||||
{
|
||||
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
|
||||
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS);
|
||||
bool inside_hitbox =
|
||||
(mouse_x >= hitbox->x1)
|
||||
&& (mouse_x <= hitbox->x2)
|
||||
&& (mouse_y >= hitbox->y1)
|
||||
&& (mouse_y <= hitbox->y2)
|
||||
;
|
||||
|
||||
return inside_hitbox;
|
||||
}
|
||||
|
||||
bool menu_input_ctl(enum menu_input_ctl_state state, void *data)
|
||||
{
|
||||
static char menu_input_keyboard_label_setting[256];
|
||||
@ -633,22 +647,6 @@ bool menu_input_ctl(enum menu_input_ctl_state state, void *data)
|
||||
menu_input->binds.last = lim->max;
|
||||
}
|
||||
break;
|
||||
case MENU_INPUT_CTL_CHECK_INSIDE_HITBOX:
|
||||
{
|
||||
menu_input_ctx_hitbox_t *hitbox = (menu_input_ctx_hitbox_t*)data;
|
||||
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
|
||||
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS);
|
||||
bool inside_hitbox =
|
||||
(mouse_x >= hitbox->x1)
|
||||
&& (mouse_x <= hitbox->x2)
|
||||
&& (mouse_y >= hitbox->y1)
|
||||
&& (mouse_y <= hitbox->y2)
|
||||
;
|
||||
|
||||
if (!inside_hitbox)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case MENU_INPUT_CTL_DEINIT:
|
||||
memset(menu_input, 0, sizeof(menu_input_t));
|
||||
pointer_dragging = false;
|
||||
@ -791,16 +789,19 @@ bool menu_input_ctl(enum menu_input_ctl_state state, void *data)
|
||||
|
||||
static int menu_input_pointer(unsigned *action)
|
||||
{
|
||||
unsigned fb_width, fb_height;
|
||||
int pointer_device, pointer_x, pointer_y;
|
||||
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
||||
menu_input_t *menu_input = menu_input_get_ptr();
|
||||
|
||||
fb_width = menu_display_get_width();
|
||||
fb_height = menu_display_get_height();
|
||||
|
||||
pointer_device = menu_driver_ctl(RARCH_MENU_CTL_IS_SET_TEXTURE, NULL) ?
|
||||
unsigned fb_width = menu_display_get_width();
|
||||
unsigned fb_height = menu_display_get_height();
|
||||
int pointer_device =
|
||||
menu_driver_ctl(RARCH_MENU_CTL_IS_SET_TEXTURE, NULL) ?
|
||||
RETRO_DEVICE_POINTER : RARCH_DEVICE_POINTER_SCREEN;
|
||||
int pointer_x =
|
||||
input_driver_state(binds, 0, pointer_device,
|
||||
0, RETRO_DEVICE_ID_POINTER_X);
|
||||
int pointer_y =
|
||||
input_driver_state(binds, 0, pointer_device,
|
||||
0, RETRO_DEVICE_ID_POINTER_Y);
|
||||
|
||||
menu_input->pointer.pressed[0] = input_driver_state(binds,
|
||||
0, pointer_device,
|
||||
@ -811,11 +812,6 @@ static int menu_input_pointer(unsigned *action)
|
||||
menu_input->pointer.back = input_driver_state(binds, 0, pointer_device,
|
||||
0, RARCH_DEVICE_ID_POINTER_BACK);
|
||||
|
||||
pointer_x = input_driver_state(binds, 0, pointer_device,
|
||||
0, RETRO_DEVICE_ID_POINTER_X);
|
||||
pointer_y = input_driver_state(binds, 0, pointer_device,
|
||||
0, RETRO_DEVICE_ID_POINTER_Y);
|
||||
|
||||
menu_input->pointer.x = ((pointer_x + 0x7fff) * (int)fb_width) / 0xFFFF;
|
||||
menu_input->pointer.y = ((pointer_y + 0x7fff) * (int)fb_height) / 0xFFFF;
|
||||
|
||||
|
@ -87,7 +87,6 @@ enum menu_input_ctl_state
|
||||
MENU_INPUT_CTL_UNSET_KEYBOARD_LABEL_SETTING,
|
||||
MENU_INPUT_CTL_SEARCH_START,
|
||||
MENU_INPUT_CTL_DEINIT,
|
||||
MENU_INPUT_CTL_CHECK_INSIDE_HITBOX,
|
||||
MENU_INPUT_CTL_BIND_NONE,
|
||||
MENU_INPUT_CTL_BIND_SINGLE,
|
||||
MENU_INPUT_CTL_BIND_ALL,
|
||||
@ -138,6 +137,8 @@ int16_t menu_input_pointer_state(enum menu_input_pointer_state state);
|
||||
|
||||
int16_t menu_input_mouse_state(enum menu_input_mouse_state state);
|
||||
|
||||
bool menu_input_mouse_check_vector_inside_hitbox(menu_input_ctx_hitbox_t *hitbox);
|
||||
|
||||
void menu_input_key_end_line(void);
|
||||
|
||||
bool menu_input_ctl(enum menu_input_ctl_state state, void *data);
|
||||
|
@ -2246,6 +2246,7 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
info.list = menu_stack;
|
||||
info.directory_ptr = selection;
|
||||
info.type = type;
|
||||
info.enum_idx = MSG_UNKNOWN;
|
||||
strlcpy(info.path, setting->default_value.string, sizeof(info.path));
|
||||
strlcpy(info.label, name, sizeof(info.label));
|
||||
|
||||
@ -3761,9 +3762,11 @@ static bool setting_append_list_input_player_options(
|
||||
snprintf(key[user], sizeof(key[user]),
|
||||
"input_player%u_joypad_index", user + 1);
|
||||
snprintf(key_type[user], sizeof(key_type[user]),
|
||||
"input_libretro_device_p%u", user + 1);
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_LIBRETRO_DEVICE),
|
||||
user + 1);
|
||||
snprintf(key_analog[user], sizeof(key_analog[user]),
|
||||
"input_player%u_analog_dpad_mode", user + 1);
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE),
|
||||
user + 1);
|
||||
snprintf(key_bind_all[user], sizeof(key_bind_all[user]),
|
||||
"input_player%u_bind_all", user + 1);
|
||||
snprintf(key_bind_all_save_autoconfig[user], sizeof(key_bind_all[user]),
|
||||
@ -3878,9 +3881,8 @@ static bool setting_append_list_input_player_options(
|
||||
|
||||
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
|
||||
{
|
||||
char label[PATH_MAX_LENGTH];
|
||||
char name[PATH_MAX_LENGTH];
|
||||
bool do_add = true;
|
||||
char label[PATH_MAX_LENGTH] = {0};
|
||||
char name[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
if (input_config_bind_map_get_meta(i))
|
||||
continue;
|
||||
@ -3888,6 +3890,7 @@ static bool setting_append_list_input_player_options(
|
||||
fill_pathname_noext(label, buffer[user],
|
||||
" ",
|
||||
sizeof(label));
|
||||
|
||||
if (
|
||||
settings->input.input_descriptor_label_show
|
||||
&& (i < RARCH_FIRST_META_KEY)
|
||||
@ -3905,7 +3908,7 @@ static bool setting_append_list_input_player_options(
|
||||
sizeof(label));
|
||||
|
||||
if (settings->input.input_descriptor_hide_unbound)
|
||||
do_add = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3913,21 +3916,18 @@ static bool setting_append_list_input_player_options(
|
||||
|
||||
snprintf(name, sizeof(name), "p%u_%s", user + 1, input_config_bind_map_get_base(i));
|
||||
|
||||
if (do_add)
|
||||
{
|
||||
CONFIG_BIND(
|
||||
list, list_info,
|
||||
&settings->input.binds[user][i],
|
||||
user + 1,
|
||||
user,
|
||||
strdup(name),
|
||||
strdup(label),
|
||||
&defaults[i],
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
(*list)[list_info->index - 1].bind_type = i + MENU_SETTINGS_BIND_BEGIN;
|
||||
}
|
||||
CONFIG_BIND(
|
||||
list, list_info,
|
||||
&settings->input.binds[user][i],
|
||||
user + 1,
|
||||
user,
|
||||
strdup(name),
|
||||
strdup(label),
|
||||
&defaults[i],
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
(*list)[list_info->index - 1].bind_type = i + MENU_SETTINGS_BIND_BEGIN;
|
||||
}
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
@ -6254,7 +6254,8 @@ static bool setting_append_list(
|
||||
&retro_keybinds_1[i],
|
||||
&group_info, &subgroup_info, parent_group);
|
||||
(*list)[list_info->index - 1].bind_type = i + MENU_SETTINGS_BIND_BEGIN;
|
||||
/* TODO - add enum_idx */
|
||||
menu_settings_list_current_add_enum_idx(list, list_info,
|
||||
MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN + i);
|
||||
}
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
@ -6591,6 +6592,21 @@ static bool setting_append_list(
|
||||
menu_settings_list_current_add_values(list, list_info, "png");
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_MENU_WALLPAPER);
|
||||
|
||||
CONFIG_FLOAT(
|
||||
list, list_info,
|
||||
&settings->menu.wallpaper.opacity,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY),
|
||||
menu_wallpaper_opacity,
|
||||
"%.3f %",
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0.0, 1.0, 0.010, true, true);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->menu.dynamic_wallpaper_enable,
|
||||
@ -6833,7 +6849,7 @@ static bool setting_append_list(
|
||||
{
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->menu.xmb_alpha_factor,
|
||||
&settings->menu.xmb.alpha_factor,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_ALPHA_FACTOR),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_ALPHA_FACTOR),
|
||||
xmb_alpha_factor,
|
||||
@ -6847,7 +6863,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->menu.xmb_scale_factor,
|
||||
&settings->menu.xmb.scale_factor,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_SCALE_FACTOR),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_SCALE_FACTOR),
|
||||
xmb_scale_factor,
|
||||
@ -6861,11 +6877,11 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->menu.xmb_font,
|
||||
sizeof(settings->menu.xmb_font),
|
||||
settings->menu.xmb.font,
|
||||
sizeof(settings->menu.xmb.font),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_FONT),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_FONT),
|
||||
settings->menu.xmb_font,
|
||||
settings->menu.xmb.font,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
@ -6875,7 +6891,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->menu.xmb_theme,
|
||||
&settings->menu.xmb.theme,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_THEME),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_THEME),
|
||||
xmb_theme,
|
||||
@ -6889,7 +6905,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->menu.xmb_shadows_enable,
|
||||
&settings->menu.xmb.shadows_enable,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE),
|
||||
xmb_shadows_enable,
|
||||
@ -6906,7 +6922,7 @@ static bool setting_append_list(
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->menu.shader_pipeline,
|
||||
&settings->menu.xmb.shader_pipeline,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_RIBBON_ENABLE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE),
|
||||
menu_shader_pipeline,
|
||||
@ -6921,9 +6937,9 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->menu.background_gradient,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_GRADIENT),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_GRADIENT),
|
||||
&settings->menu.xmb.menu_color_theme,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME),
|
||||
menu_background_gradient,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
@ -6931,7 +6947,25 @@ static bool setting_append_list(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 8, 1, true, true);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_GRADIENT);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME);
|
||||
}
|
||||
|
||||
/* only MaterialUI uses these values, don't show them on other drivers */
|
||||
if (string_is_equal(settings->menu.driver, "glui"))
|
||||
{
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->menu.materialui.menu_color_theme,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME),
|
||||
menu_background_gradient,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 4, 1, true, true);
|
||||
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME);
|
||||
}
|
||||
|
||||
CONFIG_BOOL(
|
||||
|
@ -112,8 +112,7 @@ enum setting_list_flags
|
||||
SL_FLAG_SETTINGS_LOGGING_OPTIONS = (1 << 27),
|
||||
SL_FLAG_SETTINGS_SAVING_OPTIONS = (1 << 28),
|
||||
SL_FLAG_SETTINGS_SUB_ACCOUNTS_OPTIONS = (1 << 29),
|
||||
SL_FLAG_SETTINGS_ALL = (1 << 30),
|
||||
SL_FLAG_ALLOW_EMPTY_LIST = (1 << 31)
|
||||
SL_FLAG_SETTINGS_ALL = (1 << 30)
|
||||
};
|
||||
|
||||
typedef struct rarch_setting_group_info rarch_setting_group_info_t;
|
||||
|
44
msg_hash.h
44
msg_hash.h
@ -22,6 +22,7 @@
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "driver.h"
|
||||
#include "input/input_driver.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
@ -284,7 +285,39 @@ enum msg_hash_enums
|
||||
MSG_EXTRACTING_FILE,
|
||||
MSG_NO_CONTENT_STARTING_DUMMY_CORE,
|
||||
|
||||
MENU_ENUM_LABEL_CHEEVOS_ENTRY,
|
||||
MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN,
|
||||
MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_END = MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN + RARCH_BIND_LIST_END,
|
||||
|
||||
MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY,
|
||||
MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LEGACY_RED,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK_PURPLE,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_MIDNIGHT_BLUE,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_GOLDEN,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_ELECTRIC_BLUE,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_APPLE_GREEN,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_UNDERSEA,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_VOLCANIC_RED,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED,
|
||||
MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_BLUE,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_RED,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_GREEN,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_YELLOW,
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_DARK_BLUE,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_LATE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_NORMAL,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY,
|
||||
MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_ENUM_LABEL_FILEBROWSER_ENTRY,
|
||||
MENU_ENUM_LABEL_SHADER_PARAMETERS_ENTRY,
|
||||
MENU_ENUM_LABEL_RDB_ENTRY,
|
||||
@ -495,11 +528,12 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_XMB_ALPHA_FACTOR,
|
||||
MENU_ENUM_LABEL_XMB_FONT,
|
||||
MENU_ENUM_LABEL_XMB_THEME,
|
||||
MENU_ENUM_LABEL_XMB_GRADIENT,
|
||||
MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME,
|
||||
MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE,
|
||||
MENU_ENUM_LABEL_XMB_RIBBON_ENABLE,
|
||||
MENU_ENUM_LABEL_THUMBNAILS,
|
||||
MENU_ENUM_LABEL_TIMEDATE_ENABLE,
|
||||
MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
|
||||
MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPER,
|
||||
@ -516,12 +550,14 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_XMB_ALPHA_FACTOR,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_FONT,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_THEME,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_GRADIENT,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAILS,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME,
|
||||
|
||||
/* UI settings */
|
||||
MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION,
|
||||
MENU_ENUM_LABEL_UI_COMPANION_ENABLE,
|
||||
@ -546,6 +582,8 @@ enum msg_hash_enums
|
||||
|
||||
MENU_ENUM_LABEL_MENU_THROTTLE_FRAMERATE,
|
||||
|
||||
MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY,
|
||||
MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY,
|
||||
|
||||
MENU_ENUM_LABEL_NO_ENTRIES_TO_DISPLAY,
|
||||
MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY,
|
||||
|
@ -23,11 +23,9 @@
|
||||
|
||||
#include "../../ui_companion_driver.h"
|
||||
|
||||
static bool ui_browser_window_win32_open(ui_browser_window_state_t *state)
|
||||
static bool ui_browser_window_win32_core(ui_browser_window_state_t *state, bool save)
|
||||
{
|
||||
OPENFILENAME ofn;
|
||||
|
||||
memset((void*)&ofn, 0, sizeof(OPENFILENAME));
|
||||
OPENFILENAME ofn = {};
|
||||
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
ofn.hwndOwner = (HWND)state->window;
|
||||
@ -39,15 +37,22 @@ static bool ui_browser_window_win32_open(ui_browser_window_state_t *state)
|
||||
ofn.nMaxFile = PATH_MAX;
|
||||
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
|
||||
|
||||
if (!GetOpenFileName(&ofn))
|
||||
return false;
|
||||
if ( save && !GetOpenFileName(&ofn))
|
||||
return false;
|
||||
if (!save && !GetSaveFileName(&ofn))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ui_browser_window_win32_open(ui_browser_window_state_t *state)
|
||||
{
|
||||
return ui_browser_window_win32_core(state, false);
|
||||
}
|
||||
|
||||
static bool ui_browser_window_win32_save(ui_browser_window_state_t *state)
|
||||
{
|
||||
return false;
|
||||
return ui_browser_window_win32_core(state, true);
|
||||
}
|
||||
|
||||
const ui_browser_window_t ui_browser_window_win32 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user