mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Add Left Thumbnails
Fix behaviour when right thumb is off and use as fallback in filebrowser Remove update_left_thumbnail_path Fix dual image in imageviewer Remove xmb_left_thumbnails_ident Requested Changes Fix last warning and button not switching thumb Better scaling Limit vertical size without changing position Change thumb cycling behaviour Remove update_left_thumbnail_image it was causing problems
This commit is contained in:
parent
6e662a8064
commit
a84facf636
@ -9,6 +9,7 @@
|
||||
- LOCALIZATION: Update Italian translation.
|
||||
- LOCALIZATION: Update Polish translation.
|
||||
- MENU: Disable XMB shadow icons by default for PowerPC and ARM for performance reasons.
|
||||
- MENU/XMB: Add Left Thumbnails (additional to the right).
|
||||
- MENU/XMB: Fixed left/right tab regression.
|
||||
- MENU/XMB: Fix scaling of tall images that were cut on bottom previously.
|
||||
- MENU/XMB: Menu scale factor setting now changes texts length, image scaling and margins.
|
||||
|
@ -652,6 +652,8 @@ static const unsigned input_bind_timeout = 5;
|
||||
|
||||
static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
static const unsigned menu_left_thumbnails_default = 0;
|
||||
|
||||
#ifdef IOS
|
||||
static const bool ui_companion_start_on_boot = false;
|
||||
#else
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2015-2017 - Andrés Suárez
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
* Copyright (C) 2018 - Alfredo Monclús
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@ -1474,6 +1475,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false);
|
||||
SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false);
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_UINT("menu_left_thumbnails", &settings->uints.menu_left_thumbnails, true, menu_left_thumbnails_default, false);
|
||||
SETTING_UINT("xmb_alpha_factor", &settings->uints.menu_xmb_alpha_factor, true, xmb_alpha_factor, false);
|
||||
SETTING_UINT("xmb_scale_factor", &settings->uints.menu_xmb_scale_factor, true, xmb_scale_factor, false);
|
||||
SETTING_UINT("xmb_theme", &settings->uints.menu_xmb_theme, true, xmb_icon_theme, false);
|
||||
@ -2930,7 +2932,7 @@ bool config_load_override(void)
|
||||
config_file_t *new_conf = NULL;
|
||||
bool should_append = false;
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system ?
|
||||
const char *core_name = system ?
|
||||
system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
|
||||
@ -3018,7 +3020,7 @@ bool config_load_override(void)
|
||||
if (!should_append)
|
||||
goto error;
|
||||
|
||||
/* Re-load the configuration with any overrides
|
||||
/* Re-load the configuration with any overrides
|
||||
* that might have been found */
|
||||
buf[0] = '\0';
|
||||
|
||||
@ -3103,7 +3105,7 @@ bool config_unload_override(void)
|
||||
bool config_load_remap(void)
|
||||
{
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *remap_directory = NULL;
|
||||
char *remap_directory = NULL;
|
||||
char *core_path = NULL;
|
||||
char *game_path = NULL;
|
||||
config_file_t *new_conf = NULL;
|
||||
@ -3123,12 +3125,12 @@ bool config_load_remap(void)
|
||||
/* path to the directory containing retroarch.cfg (prefix) */
|
||||
remap_directory = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
/* final path for core-specific configuration (prefix+suffix) */
|
||||
/* final path for core-specific configuration (prefix+suffix) */
|
||||
core_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
/* final path for game-specific configuration (prefix+suffix) */
|
||||
game_path = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
remap_directory[0] = core_path[0] = game_path[0] = '\0';
|
||||
|
||||
strlcpy(remap_directory,
|
||||
@ -3230,7 +3232,7 @@ bool config_load_shader_preset(void)
|
||||
char *parent_path = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system
|
||||
const char *core_name = system
|
||||
? system->info.library_name : NULL;
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
|
||||
@ -4181,28 +4183,28 @@ bool config_save_overrides(int override_type)
|
||||
char cfg[64];
|
||||
|
||||
cfg[0] = '\0';
|
||||
if (settings->uints.input_device[i]
|
||||
if (settings->uints.input_device[i]
|
||||
!= overrides->uints.input_device[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_device_p%u", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_device[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_joypad_map[i]
|
||||
if (settings->uints.input_joypad_map[i]
|
||||
!= overrides->uints.input_joypad_map[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_joypad_index", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_joypad_map[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_libretro_device[i]
|
||||
if (settings->uints.input_libretro_device[i]
|
||||
!= overrides->uints.input_libretro_device[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_libretro_device_p%u", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_libretro_device[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_analog_dpad_mode[i]
|
||||
if (settings->uints.input_analog_dpad_mode[i]
|
||||
!= overrides->uints.input_analog_dpad_mode[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_analog_dpad_mode", i + 1);
|
||||
|
@ -350,6 +350,7 @@ typedef struct settings
|
||||
unsigned video_msg_bgcolor_blue;
|
||||
|
||||
unsigned menu_thumbnails;
|
||||
unsigned menu_left_thumbnails;
|
||||
unsigned menu_dpi_override_value;
|
||||
unsigned menu_entry_normal_color;
|
||||
unsigned menu_entry_hover_color;
|
||||
|
@ -1035,6 +1035,8 @@ MSG_HASH(MENU_ENUM_LABEL_THREADED_DATA_RUNLOOP_ENABLE,
|
||||
"threaded_data_runloop_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS,
|
||||
"thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_LEFT_THUMBNAILS,
|
||||
"left thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY,
|
||||
"thumbnails_directory")
|
||||
MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST,
|
||||
|
@ -1631,6 +1631,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE,
|
||||
"Threaded tasks")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS,
|
||||
"Thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS,
|
||||
"Left Thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY,
|
||||
"Thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST,
|
||||
@ -2926,6 +2928,10 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_THUMBNAILS,
|
||||
"Type of thumbnail to display."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS,
|
||||
"Type of thumbnail to display at the left."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE,
|
||||
"Shows current date and/or time inside the menu."
|
||||
|
@ -1134,6 +1134,47 @@ static void menu_action_setting_disp_set_label_thumbnails(
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_left_thumbnails(
|
||||
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();
|
||||
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
strlcpy(s2, path, len2);
|
||||
*w = 19;
|
||||
|
||||
switch (settings->uints.menu_left_thumbnails)
|
||||
{
|
||||
case 0:
|
||||
strlcpy(s, msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_OFF), len);
|
||||
break;
|
||||
case 1:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS), len);
|
||||
break;
|
||||
case 2:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS), len);
|
||||
break;
|
||||
case 3:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS), len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_menu_toggle_gamepad_combo(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
@ -1912,6 +1953,10 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_thumbnails);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_LEFT_THUMBNAILS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_left_thumbnails);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_menu_toggle_gamepad_combo);
|
||||
|
@ -104,14 +104,22 @@ int action_switch_thumbnail(const char *path,
|
||||
if (!settings)
|
||||
return -1;
|
||||
|
||||
settings->uints.menu_thumbnails++;
|
||||
|
||||
if (settings->uints.menu_thumbnails > 3)
|
||||
settings->uints.menu_thumbnails = 0;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL);
|
||||
|
||||
if (settings->uints.menu_thumbnails == 0)
|
||||
{
|
||||
settings->uints.menu_left_thumbnails++;
|
||||
if (settings->uints.menu_left_thumbnails > 3)
|
||||
settings->uints.menu_left_thumbnails = 1;
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings->uints.menu_thumbnails++;
|
||||
if (settings->uints.menu_thumbnails > 3)
|
||||
settings->uints.menu_thumbnails = 1;
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -225,6 +225,7 @@ default_sublabel_macro(action_bind_sublabel_stdin_cmd_enable, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_mouse_enable, MENU_ENUM_SUBLABEL_MOUSE_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_pointer_enable, MENU_ENUM_SUBLABEL_POINTER_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_thumbnails, MENU_ENUM_SUBLABEL_THUMBNAILS)
|
||||
default_sublabel_macro(action_bind_sublabel_left_thumbnails, MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS)
|
||||
default_sublabel_macro(action_bind_sublabel_timedate_enable, MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_battery_level_enable, MENU_ENUM_SUBLABEL_BATTERY_LEVEL_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_navigation_wraparound, MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND)
|
||||
@ -416,8 +417,8 @@ static int action_bind_sublabel_subsystem_add(
|
||||
|
||||
if (subsystem && content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
snprintf(s, len, " Current Content: %s",
|
||||
content_get_subsystem() == type - MENU_SETTINGS_SUBSYSTEM_ADD
|
||||
? subsystem->roms[content_get_subsystem_rom_id()].desc
|
||||
content_get_subsystem() == type - MENU_SETTINGS_SUBSYSTEM_ADD
|
||||
? subsystem->roms[content_get_subsystem_rom_id()].desc
|
||||
: subsystem->roms[0].desc);
|
||||
|
||||
return 0;
|
||||
@ -962,6 +963,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_THUMBNAILS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_thumbnails);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_LEFT_THUMBNAILS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_left_thumbnails);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MOUSE_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_mouse_enable);
|
||||
break;
|
||||
|
@ -992,7 +992,7 @@ static void materialui_render_label_value(
|
||||
|
||||
if (texture_switch)
|
||||
{
|
||||
/* This will be used instead of label_color if
|
||||
/* This will be used instead of label_color if
|
||||
* texture_switch is 'off' icon */
|
||||
float pure_white[16]= {
|
||||
1.00, 1.00, 1.00, 1.00,
|
||||
@ -1568,7 +1568,7 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
{
|
||||
materialui_draw_tab_begin(mui,
|
||||
video_info,
|
||||
width, height,
|
||||
width, height,
|
||||
footer_bg_color ? &footer_bg_color[0] : NULL,
|
||||
&grey_bg[0]);
|
||||
|
||||
@ -1860,6 +1860,7 @@ static bool materialui_load_image(void *userdata, void *data, enum menu_image_ty
|
||||
menu_display_allocate_white_texture();
|
||||
break;
|
||||
case MENU_IMAGE_THUMBNAIL:
|
||||
case MENU_IMAGE_LEFT_THUMBNAIL:
|
||||
case MENU_IMAGE_SAVESTATE_THUMBNAIL:
|
||||
break;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2014-2017 - Jean-André Santoni
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
* Copyright (C) 2018 - Alfredo Monclús
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@ -196,12 +197,15 @@ typedef struct xmb_handle
|
||||
unsigned categories_active_idx;
|
||||
unsigned categories_active_idx_old;
|
||||
uintptr_t thumbnail;
|
||||
uintptr_t left_thumbnail;
|
||||
uintptr_t savestate_thumbnail;
|
||||
|
||||
float x;
|
||||
float alpha;
|
||||
float thumbnail_width;
|
||||
float thumbnail_height;
|
||||
float left_thumbnail_width;
|
||||
float left_thumbnail_height;
|
||||
float savestate_thumbnail_width;
|
||||
float savestate_thumbnail_height;
|
||||
float above_subitem_offset;
|
||||
@ -243,6 +247,7 @@ typedef struct xmb_handle
|
||||
char *thumbnail_content;
|
||||
char *savestate_thumbnail_file_path;
|
||||
char *thumbnail_file_path;
|
||||
char *left_thumbnail_file_path;
|
||||
char *bg_file_path;
|
||||
|
||||
file_list_t *selection_buf_old;
|
||||
@ -506,11 +511,17 @@ static xmb_node_t *xmb_copy_node(const xmb_node_t *old_node)
|
||||
return new_node;
|
||||
}
|
||||
|
||||
static const char *xmb_thumbnails_ident(void)
|
||||
static const char *xmb_thumbnails_ident(char pos)
|
||||
{
|
||||
char folder;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
switch (settings->uints.menu_thumbnails)
|
||||
if (pos == 'R')
|
||||
folder = settings->uints.menu_thumbnails;
|
||||
if (pos == 'L')
|
||||
folder = settings->uints.menu_left_thumbnails;
|
||||
|
||||
switch (folder)
|
||||
{
|
||||
case 1:
|
||||
return "Named_Snaps";
|
||||
@ -981,7 +992,7 @@ end:
|
||||
string_list_free(list);
|
||||
}
|
||||
|
||||
static void xmb_update_thumbnail_path(void *data, unsigned i)
|
||||
static void xmb_update_thumbnail_path(void *data, unsigned i, char pos)
|
||||
{
|
||||
menu_entry_t entry;
|
||||
unsigned entry_type = 0;
|
||||
@ -1034,10 +1045,19 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
|
||||
|
||||
if (string_is_equal(core_name, "imageviewer"))
|
||||
{
|
||||
if (!string_is_empty(entry.label))
|
||||
strlcpy(new_path, entry.label,
|
||||
sizeof(new_path));
|
||||
goto end;
|
||||
if (pos == 'R' || (pos == 'L' && string_is_equal(xmb_thumbnails_ident('R'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))))
|
||||
{
|
||||
if (!string_is_empty(entry.label))
|
||||
strlcpy(new_path, entry.label,
|
||||
sizeof(new_path));
|
||||
goto end;
|
||||
}
|
||||
else
|
||||
{
|
||||
xmb->left_thumbnail = 0;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1056,9 +1076,13 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
|
||||
|
||||
tmp_new2[0] = '\0';
|
||||
|
||||
/* Append Named_Snaps/Named_Boxart/Named_Titles */
|
||||
fill_pathname_join(tmp_new2, new_path,
|
||||
xmb_thumbnails_ident(), PATH_MAX_LENGTH * sizeof(char));
|
||||
/* Append Named_Snaps/Named_Boxarts/Named_Titles */
|
||||
if (pos == 'R')
|
||||
fill_pathname_join(tmp_new2, new_path,
|
||||
xmb_thumbnails_ident('R'), PATH_MAX_LENGTH * sizeof(char));
|
||||
if (pos == 'L')
|
||||
fill_pathname_join(tmp_new2, new_path,
|
||||
xmb_thumbnails_ident('L'), PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
strlcpy(new_path, tmp_new2,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
@ -1104,7 +1128,13 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
|
||||
|
||||
end:
|
||||
if (xmb && !string_is_empty(new_path))
|
||||
xmb->thumbnail_file_path = strdup(new_path);
|
||||
{
|
||||
if (pos == 'R')
|
||||
xmb->thumbnail_file_path = strdup(new_path);
|
||||
if (pos == 'L')
|
||||
xmb->left_thumbnail_file_path = strdup(new_path);
|
||||
}
|
||||
|
||||
menu_entry_free(&entry);
|
||||
}
|
||||
|
||||
@ -1170,17 +1200,32 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
||||
static void xmb_update_thumbnail_image(void *data)
|
||||
{
|
||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||
if (!xmb || string_is_empty(xmb->thumbnail_file_path))
|
||||
if (!xmb)
|
||||
return;
|
||||
|
||||
if (filestream_exists(xmb->thumbnail_file_path))
|
||||
task_push_image_load(xmb->thumbnail_file_path,
|
||||
menu_display_handle_thumbnail_upload, NULL);
|
||||
else
|
||||
xmb->thumbnail = 0;
|
||||
if (!(string_is_empty(xmb->thumbnail_file_path)))
|
||||
{
|
||||
if (filestream_exists(xmb->thumbnail_file_path))
|
||||
task_push_image_load(xmb->thumbnail_file_path,
|
||||
menu_display_handle_thumbnail_upload, NULL);
|
||||
else
|
||||
xmb->thumbnail = 0;
|
||||
|
||||
free(xmb->thumbnail_file_path);
|
||||
xmb->thumbnail_file_path = NULL;
|
||||
free(xmb->thumbnail_file_path);
|
||||
xmb->thumbnail_file_path = NULL;
|
||||
}
|
||||
|
||||
if (!(string_is_empty(xmb->left_thumbnail_file_path)))
|
||||
{
|
||||
if (filestream_exists(xmb->left_thumbnail_file_path))
|
||||
task_push_image_load(xmb->left_thumbnail_file_path,
|
||||
menu_display_handle_left_thumbnail_upload, NULL);
|
||||
else
|
||||
xmb->left_thumbnail = 0;
|
||||
|
||||
free(xmb->left_thumbnail_file_path);
|
||||
xmb->left_thumbnail_file_path = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void xmb_set_thumbnail_system(void *data, char*s, size_t len)
|
||||
@ -1248,7 +1293,8 @@ static void xmb_selection_pointer_changed(
|
||||
menu_list_t *menu_list = NULL;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
const char *thumb_ident = xmb_thumbnails_ident();
|
||||
const char *thumb_ident = xmb_thumbnails_ident('R');
|
||||
const char *lft_thumb_ident= xmb_thumbnails_ident('L');
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_LIST_GET, &menu_list);
|
||||
menu_entry_init(&entry);
|
||||
@ -1290,8 +1336,8 @@ static void xmb_selection_pointer_changed(
|
||||
|
||||
ia = xmb->items_active_alpha;
|
||||
iz = xmb->items_active_zoom;
|
||||
|
||||
if (!string_is_equal(thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)) || !string_is_equal(lft_thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
if ((xmb_system_tab > XMB_SYSTEM_TAB_SETTINGS && depth == 1) ||
|
||||
@ -1299,8 +1345,18 @@ static void xmb_selection_pointer_changed(
|
||||
{
|
||||
if (!string_is_empty(entry.path))
|
||||
xmb_set_thumbnail_content(xmb, entry.path, 0 /* will be ignored */);
|
||||
xmb_update_thumbnail_path(xmb, i);
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
if (!string_is_equal(thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
xmb_update_thumbnail_path(xmb, i, 'R');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
if (!string_is_equal(lft_thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
xmb_update_thumbnail_path(xmb, i, 'L');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
}
|
||||
else if (((entry_type == FILE_TYPE_IMAGE || entry_type == FILE_TYPE_IMAGEVIEWER ||
|
||||
entry_type == FILE_TYPE_RDB || entry_type == FILE_TYPE_RDB_ENTRY)
|
||||
@ -1308,14 +1364,34 @@ static void xmb_selection_pointer_changed(
|
||||
{
|
||||
if (!string_is_empty(entry.path))
|
||||
xmb_set_thumbnail_content(xmb, entry.path, 0 /* will be ignored */);
|
||||
xmb_update_thumbnail_path(xmb, i);
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
if (!string_is_equal(thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
xmb_update_thumbnail_path(xmb, i, 'R');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
else if (!string_is_equal(lft_thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
xmb_update_thumbnail_path(xmb, i, 'L');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
}
|
||||
else if (filebrowser_get_type() != FILEBROWSER_NONE)
|
||||
{
|
||||
xmb_reset_thumbnail_content(xmb);
|
||||
xmb_update_thumbnail_path(xmb, i);
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
if (!string_is_equal(thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
xmb_update_thumbnail_path(xmb, i, 'R');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
else if (!string_is_equal(lft_thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
xmb_update_thumbnail_path(xmb, i, 'L');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
}
|
||||
}
|
||||
xmb_update_savestate_thumbnail_path(xmb, i);
|
||||
@ -1501,7 +1577,9 @@ static void xmb_list_open_new(xmb_handle_t *xmb,
|
||||
{
|
||||
if (xmb->depth < 4)
|
||||
xmb_reset_thumbnail_content(xmb);
|
||||
xmb_update_thumbnail_path(xmb, 0);
|
||||
xmb_update_thumbnail_path(xmb, 0, 'R');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
xmb_update_thumbnail_path(xmb, 0, 'L');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
}
|
||||
@ -1811,7 +1889,7 @@ static void xmb_list_switch(xmb_handle_t *xmb)
|
||||
xmb_list_switch_new(xmb, selection_buf, dir, selection);
|
||||
xmb->categories_active_idx_old = (unsigned)xmb->categories_selection_ptr;
|
||||
|
||||
if (!string_is_equal(xmb_thumbnails_ident(),
|
||||
if (!string_is_equal(xmb_thumbnails_ident('R'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
menu_entry_t entry;
|
||||
@ -1824,7 +1902,23 @@ static void xmb_list_switch(xmb_handle_t *xmb)
|
||||
|
||||
menu_entry_free(&entry);
|
||||
|
||||
xmb_update_thumbnail_path(xmb, 0);
|
||||
xmb_update_thumbnail_path(xmb, 0, 'R');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
if (!string_is_equal(xmb_thumbnails_ident('L'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
menu_entry_t entry;
|
||||
|
||||
menu_entry_init(&entry);
|
||||
menu_entry_get(&entry, 0, selection, NULL, true);
|
||||
|
||||
if (!string_is_empty(entry.path))
|
||||
xmb_set_thumbnail_content(xmb, entry.path, 0 /* will be ignored */);
|
||||
|
||||
menu_entry_free(&entry);
|
||||
|
||||
xmb_update_thumbnail_path(xmb, 0, 'L');
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
}
|
||||
}
|
||||
@ -2159,10 +2253,13 @@ static void xmb_populate_entries(void *data,
|
||||
{
|
||||
xmb_selection_pointer_changed(xmb, false);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
|
||||
if (!string_is_equal(xmb_thumbnails_ident(),
|
||||
if (!string_is_equal(xmb_thumbnails_ident('R'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
xmb_update_savestate_thumbnail_image(xmb);
|
||||
if (!string_is_equal(xmb_thumbnails_ident('L'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2384,6 +2481,7 @@ static int xmb_draw_item(
|
||||
file_list_t *list,
|
||||
float *color,
|
||||
const char *thumb_ident,
|
||||
const char *left_thumb_ident,
|
||||
uint64_t frame_count,
|
||||
size_t i,
|
||||
size_t current,
|
||||
@ -2489,7 +2587,11 @@ static int xmb_draw_item(
|
||||
(!string_is_equal
|
||||
(thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))
|
||||
&& xmb->thumbnail)
|
||||
&& xmb->thumbnail) ||
|
||||
(!string_is_equal
|
||||
(left_thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))
|
||||
&& xmb->left_thumbnail)
|
||||
)
|
||||
ticker_limit = 40 * scale_mod[1];
|
||||
else
|
||||
@ -2640,7 +2742,8 @@ static void xmb_draw_items(
|
||||
xmb_node_t *core_node = NULL;
|
||||
size_t end = 0;
|
||||
uint64_t frame_count = xmb ? xmb->frame_count : 0;
|
||||
const char *thumb_ident = xmb_thumbnails_ident();
|
||||
const char *thumb_ident = xmb_thumbnails_ident('R');
|
||||
const char *left_thumb_ident= xmb_thumbnails_ident('L');
|
||||
|
||||
if (!list || !list->size || !xmb)
|
||||
return;
|
||||
@ -2690,7 +2793,7 @@ static void xmb_draw_items(
|
||||
&entry,
|
||||
&mymat,
|
||||
xmb, core_node,
|
||||
list, color, thumb_ident,
|
||||
list, color, thumb_ident, left_thumb_ident,
|
||||
frame_count,
|
||||
i, current,
|
||||
width, height);
|
||||
@ -2927,7 +3030,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
size_t percent_width = 0;
|
||||
math_matrix_4x4 mymat;
|
||||
unsigned i;
|
||||
float thumb_width, thumb_height;
|
||||
float thumb_width, thumb_height, left_thumb_width, left_thumb_height;
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
char msg[1024];
|
||||
char title_msg[255];
|
||||
@ -3019,7 +3122,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
xmb->savestate_thumbnail_width, xmb->savestate_thumbnail_height,
|
||||
xmb->savestate_thumbnail);
|
||||
else if (xmb->thumbnail
|
||||
&& !string_is_equal(xmb_thumbnails_ident(),
|
||||
&& !string_is_equal(xmb_thumbnails_ident('R'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
#ifdef XMB_DEBUG
|
||||
@ -3028,7 +3131,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
#endif
|
||||
|
||||
/* Limit thumbnail height to screen height + margin. */
|
||||
if( xmb->margins_screen_top + xmb->icon_size + xmb->thumbnail_height * scale_mod[4] >=
|
||||
if( xmb->margins_screen_top + xmb->icon_size + xmb->thumbnail_height * scale_mod[4] >=
|
||||
(float)(height * 0.96) )
|
||||
{
|
||||
thumb_width = xmb->thumbnail_width *
|
||||
@ -3051,6 +3154,40 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
xmb->margins_screen_top + xmb->icon_size + thumb_height * scale_mod[4],
|
||||
thumb_width, thumb_height,
|
||||
xmb->thumbnail);
|
||||
|
||||
}
|
||||
|
||||
/* Left Thumbnail */
|
||||
|
||||
if (xmb->left_thumbnail
|
||||
&& !string_is_equal(xmb_thumbnails_ident('L'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
|
||||
/* Limit thumbnail height to screen height + margin. */
|
||||
|
||||
if( xmb->margins_screen_top + xmb->icon_size * 2.2 + xmb->left_thumbnail_height >=
|
||||
(float)(height * 0.9) )
|
||||
{
|
||||
left_thumb_width = (xmb->left_thumbnail_width / scale_mod[4]) *
|
||||
(((float)(height * 0.9) - xmb->margins_screen_top - xmb->icon_size * 2.2) /
|
||||
(xmb->left_thumbnail_height * scale_mod[4]));
|
||||
left_thumb_height = (xmb->left_thumbnail_height / scale_mod[4]) *
|
||||
(((float)(height * 0.9) - xmb->margins_screen_top - xmb->icon_size * 2.2) /
|
||||
(xmb->left_thumbnail_height * scale_mod[4]));
|
||||
}
|
||||
else
|
||||
{
|
||||
left_thumb_width = xmb->left_thumbnail_width / scale_mod[4];
|
||||
left_thumb_height = xmb->left_thumbnail_height / scale_mod[4];
|
||||
}
|
||||
|
||||
xmb_draw_thumbnail(video_info,
|
||||
xmb, &coord_white[0], width, height,
|
||||
xmb->margins_title_left - 10,
|
||||
xmb->margins_screen_top + xmb->icon_size * 2.2 + left_thumb_height * scale_mod[4],
|
||||
left_thumb_width, left_thumb_height,
|
||||
xmb->left_thumbnail);
|
||||
}
|
||||
|
||||
/* Clock image */
|
||||
@ -3334,6 +3471,7 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
|
||||
|
||||
|
||||
xmb->thumbnail_width = 460.0 * scale_factor;
|
||||
xmb->left_thumbnail_width = 430.0 * scale_factor;
|
||||
xmb->savestate_thumbnail_width= 460.0 * scale_factor;
|
||||
xmb->cursor_size = 64.0 * scale_factor;
|
||||
|
||||
@ -3409,6 +3547,7 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
||||
xmb->margins_screen_top = (256+32) * scale_factor;
|
||||
|
||||
xmb->thumbnail_width = 460.0 * scale_factor;
|
||||
xmb->left_thumbnail_width = 400.0 * scale_factor;
|
||||
xmb->savestate_thumbnail_width= 460.0 * scale_factor;
|
||||
xmb->cursor_size = 64.0;
|
||||
|
||||
@ -3710,6 +3849,8 @@ static void xmb_free(void *data)
|
||||
free(xmb->savestate_thumbnail_file_path);
|
||||
if (!string_is_empty(xmb->thumbnail_file_path))
|
||||
free(xmb->thumbnail_file_path);
|
||||
if (!string_is_empty(xmb->left_thumbnail_file_path))
|
||||
free(xmb->left_thumbnail_file_path);
|
||||
if (!string_is_empty(xmb->bg_file_path))
|
||||
free(xmb->bg_file_path);
|
||||
}
|
||||
@ -3754,6 +3895,16 @@ static bool xmb_load_image(void *userdata, void *data, enum menu_image_type type
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR, &xmb->thumbnail);
|
||||
}
|
||||
break;
|
||||
case MENU_IMAGE_LEFT_THUMBNAIL:
|
||||
{
|
||||
struct texture_image *img = (struct texture_image*)data;
|
||||
xmb->left_thumbnail_height = xmb->left_thumbnail_width
|
||||
* (float)img->height / (float)img->width;
|
||||
video_driver_texture_unload(&xmb->left_thumbnail);
|
||||
video_driver_texture_load(data,
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR, &xmb->left_thumbnail);
|
||||
}
|
||||
break;
|
||||
case MENU_IMAGE_SAVESTATE_THUMBNAIL:
|
||||
{
|
||||
struct texture_image *img = (struct texture_image*)data;
|
||||
@ -4008,7 +4159,10 @@ static void xmb_context_reset(void *data, bool is_threaded)
|
||||
xmb_context_reset_background(iconpath);
|
||||
xmb_context_reset_horizontal_list(xmb);
|
||||
|
||||
if (!string_is_equal(xmb_thumbnails_ident(),
|
||||
if (!string_is_equal(xmb_thumbnails_ident('R'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
if (!string_is_equal(xmb_thumbnails_ident('R'),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
xmb_update_thumbnail_image(xmb);
|
||||
xmb_update_savestate_thumbnail_image(xmb);
|
||||
@ -4316,6 +4470,7 @@ static void xmb_context_destroy(void *data)
|
||||
video_driver_texture_unload(&xmb->textures.list[i]);
|
||||
|
||||
video_driver_texture_unload(&xmb->thumbnail);
|
||||
video_driver_texture_unload(&xmb->left_thumbnail);
|
||||
video_driver_texture_unload(&xmb->savestate_thumbnail);
|
||||
|
||||
xmb_context_destroy_horizontal_list(xmb);
|
||||
|
@ -505,14 +505,14 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
|
||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
||||
snprintf(tmp, sizeof(tmp), "Port #%d device display name: %s",
|
||||
controller,
|
||||
input_config_get_device_display_name(controller) ?
|
||||
input_config_get_device_display_name(controller) ?
|
||||
input_config_get_device_display_name(controller) : "N/A");
|
||||
menu_entries_append_enum(info->list, tmp, "",
|
||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
|
||||
snprintf(tmp, sizeof(tmp), "Port #%d device config name: %s",
|
||||
controller,
|
||||
input_config_get_device_display_name(controller) ?
|
||||
input_config_get_device_display_name(controller) ?
|
||||
input_config_get_device_config_name(controller) : "N/A");
|
||||
menu_entries_append_enum(info->list, tmp, "",
|
||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
||||
@ -2596,7 +2596,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
}
|
||||
|
||||
|
||||
if (settings->bools.quick_menu_show_save_load_state
|
||||
if (settings->bools.quick_menu_show_save_load_state
|
||||
#ifdef HAVE_CHEEVOS
|
||||
&& !(settings->bools.cheevos_hardcore_mode_enable && cheevos_loaded)
|
||||
#endif
|
||||
@ -5339,6 +5339,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_THUMBNAILS,
|
||||
PARSE_ONLY_UINT, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_LEFT_THUMBNAILS,
|
||||
PARSE_ONLY_UINT, false);
|
||||
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
@ -6162,7 +6165,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_LOAD_CONTENT_LIST:
|
||||
case DISPLAYLIST_LOAD_CONTENT_SPECIAL:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
|
||||
if (!string_is_empty(settings->paths.directory_menu_content))
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
|
||||
@ -6655,17 +6658,17 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
info->type_default = FILE_TYPE_SHADER_PRESET;
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_CG) &&
|
||||
video_shader_get_type_from_ext("cgp", &is_preset)
|
||||
video_shader_get_type_from_ext("cgp", &is_preset)
|
||||
!= RARCH_SHADER_NONE)
|
||||
string_list_append(str_list, "cgp", attr);
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_GLSL) &&
|
||||
video_shader_get_type_from_ext("glslp", &is_preset)
|
||||
video_shader_get_type_from_ext("glslp", &is_preset)
|
||||
!= RARCH_SHADER_NONE)
|
||||
string_list_append(str_list, "glslp", attr);
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_SLANG) &&
|
||||
video_shader_get_type_from_ext("slangp", &is_preset)
|
||||
video_shader_get_type_from_ext("slangp", &is_preset)
|
||||
!= RARCH_SHADER_NONE)
|
||||
string_list_append(str_list, "slangp", attr);
|
||||
string_list_join_concat(new_exts, sizeof(new_exts), str_list, "|");
|
||||
@ -6694,17 +6697,17 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_CG) &&
|
||||
video_shader_get_type_from_ext("cg", &is_preset)
|
||||
video_shader_get_type_from_ext("cg", &is_preset)
|
||||
!= RARCH_SHADER_NONE)
|
||||
string_list_append(str_list, "cg", attr);
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_GLSL) &&
|
||||
video_shader_get_type_from_ext("glsl", &is_preset)
|
||||
video_shader_get_type_from_ext("glsl", &is_preset)
|
||||
!= RARCH_SHADER_NONE)
|
||||
string_list_append(str_list, "glsl", attr);
|
||||
|
||||
if (video_shader_is_supported(RARCH_SHADER_SLANG) &&
|
||||
video_shader_get_type_from_ext("slang", &is_preset)
|
||||
video_shader_get_type_from_ext("slang", &is_preset)
|
||||
!= RARCH_SHADER_NONE)
|
||||
string_list_append(str_list, "slang", attr);
|
||||
|
||||
|
@ -629,7 +629,7 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw,
|
||||
coords.vertex = new_vertex;
|
||||
coords.tex_coord = new_tex_coord;
|
||||
coords.lut_tex_coord = new_tex_coord;
|
||||
coords.color = (const float*)draw->color;
|
||||
coords.color = (const float*)draw->color;
|
||||
|
||||
draw->coords = &coords;
|
||||
draw->scale_factor = 1.0f;
|
||||
@ -1023,9 +1023,9 @@ void menu_display_rotate_z(menu_display_ctx_rotate_draw_t *draw,
|
||||
math_matrix_4x4 *b = NULL;
|
||||
|
||||
if (
|
||||
!draw ||
|
||||
!menu_disp ||
|
||||
!menu_disp->get_default_mvp ||
|
||||
!draw ||
|
||||
!menu_disp ||
|
||||
!menu_disp->get_default_mvp ||
|
||||
menu_disp->handles_transform
|
||||
)
|
||||
return;
|
||||
@ -1074,6 +1074,22 @@ void menu_display_handle_thumbnail_upload(void *task_data,
|
||||
free(user_data);
|
||||
}
|
||||
|
||||
void menu_display_handle_left_thumbnail_upload(void *task_data,
|
||||
void *user_data, const char *err)
|
||||
{
|
||||
menu_ctx_load_image_t load_image_info;
|
||||
struct texture_image *img = (struct texture_image*)task_data;
|
||||
|
||||
load_image_info.data = img;
|
||||
load_image_info.type = MENU_IMAGE_LEFT_THUMBNAIL;
|
||||
|
||||
menu_driver_load_image(&load_image_info);
|
||||
|
||||
image_texture_free(img);
|
||||
free(img);
|
||||
free(user_data);
|
||||
}
|
||||
|
||||
void menu_display_handle_savestate_thumbnail_upload(void *task_data,
|
||||
void *user_data, const char *err)
|
||||
{
|
||||
@ -2183,7 +2199,8 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
|
||||
if (!menu_driver_ctx || !menu_driver_ctx->update_thumbnail_path)
|
||||
return false;
|
||||
menu_driver_ctx->update_thumbnail_path(menu_userdata, (unsigned)selection);
|
||||
menu_driver_ctx->update_thumbnail_path(menu_userdata, (unsigned)selection, 'L');
|
||||
menu_driver_ctx->update_thumbnail_path(menu_userdata, (unsigned)selection, 'R');
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE:
|
||||
|
@ -61,6 +61,7 @@ enum menu_image_type
|
||||
MENU_IMAGE_NONE = 0,
|
||||
MENU_IMAGE_WALLPAPER,
|
||||
MENU_IMAGE_THUMBNAIL,
|
||||
MENU_IMAGE_LEFT_THUMBNAIL,
|
||||
MENU_IMAGE_SAVESTATE_THUMBNAIL
|
||||
};
|
||||
|
||||
@ -491,7 +492,7 @@ typedef struct menu_ctx_driver
|
||||
int (*pointer_tap)(void *data, unsigned x, unsigned y, unsigned ptr,
|
||||
menu_file_list_cbs_t *cbs,
|
||||
menu_entry_t *entry, unsigned action);
|
||||
void (*update_thumbnail_path)(void *data, unsigned i);
|
||||
void (*update_thumbnail_path)(void *data, unsigned i, char pos);
|
||||
void (*update_thumbnail_image)(void *data);
|
||||
void (*set_thumbnail_system)(void *data, char* s, size_t len);
|
||||
void (*set_thumbnail_content)(void *data, char* s, size_t len);
|
||||
@ -721,6 +722,9 @@ void menu_display_handle_wallpaper_upload(void *task_data,
|
||||
void menu_display_handle_thumbnail_upload(void *task_data,
|
||||
void *user_data, const char *err);
|
||||
|
||||
void menu_display_handle_left_thumbnail_upload(void *task_data,
|
||||
void *user_data, const char *err);
|
||||
|
||||
void menu_display_handle_savestate_thumbnail_upload(void *task_data,
|
||||
void *user_data, const char *err);
|
||||
|
||||
|
@ -1523,7 +1523,7 @@ static void get_string_representation_bind_device(void * data, char *s,
|
||||
|
||||
if (map < max_devices)
|
||||
{
|
||||
const char *device_name = input_config_get_device_display_name(map) ?
|
||||
const char *device_name = input_config_get_device_display_name(map) ?
|
||||
input_config_get_device_display_name(map) : input_config_get_device_name(map);
|
||||
|
||||
if (!string_is_empty(device_name))
|
||||
@ -5545,7 +5545,7 @@ static bool setting_append_list(
|
||||
|
||||
if (string_is_equal(settings->arrays.menu_driver, "glui"))
|
||||
{
|
||||
/* only GLUI uses these values, don't show
|
||||
/* only GLUI uses these values, don't show
|
||||
* them on other drivers */
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
@ -5579,7 +5579,7 @@ static bool setting_append_list(
|
||||
#ifdef HAVE_XMB
|
||||
if (string_is_equal(settings->arrays.menu_driver, "xmb"))
|
||||
{
|
||||
/* only XMB uses these values, don't show
|
||||
/* only XMB uses these values, don't show
|
||||
* them on other drivers. */
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
@ -5814,7 +5814,7 @@ static bool setting_append_list(
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
|
||||
#ifdef HAVE_LAKKA
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
@ -5831,7 +5831,7 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_XMB
|
||||
if (string_is_equal(settings->arrays.menu_driver, "xmb"))
|
||||
{
|
||||
@ -5850,7 +5850,7 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
settings->paths.menu_content_show_settings_password,
|
||||
@ -5866,7 +5866,7 @@ static bool setting_append_list(
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT | SD_FLAG_LAKKA_ADVANCED);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_content_show_favorites,
|
||||
@ -5984,7 +5984,7 @@ static bool setting_append_list(
|
||||
#ifdef HAVE_MATERIALUI
|
||||
if (string_is_equal(settings->arrays.menu_driver, "glui"))
|
||||
{
|
||||
/* only MaterialUI uses these values, don't show
|
||||
/* only MaterialUI uses these values, don't show
|
||||
* them on other drivers. */
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
@ -6073,6 +6073,19 @@ static bool setting_append_list(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.menu_left_thumbnails,
|
||||
MENU_ENUM_LABEL_LEFT_THUMBNAILS,
|
||||
MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS,
|
||||
menu_left_thumbnails_default,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
||||
}
|
||||
|
||||
CONFIG_BOOL(
|
||||
|
@ -184,7 +184,7 @@ enum msg_hash_enums
|
||||
MSG_NETPLAY_CHANGED_NICK,
|
||||
MSG_ADDED_TO_FAVORITES,
|
||||
MSG_RESET_CORE_ASSOCIATION,
|
||||
MSG_CORE_ASSOCIATION_RESET,
|
||||
MSG_CORE_ASSOCIATION_RESET,
|
||||
MSG_AUTODETECT,
|
||||
MSG_AUDIO_VOLUME,
|
||||
MSG_AUDIO_MIXER_VOLUME,
|
||||
@ -773,6 +773,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(CONTENT_SHOW_ADD),
|
||||
MENU_LABEL(XMB_RIBBON_ENABLE),
|
||||
MENU_LABEL(THUMBNAILS),
|
||||
MENU_LABEL(LEFT_THUMBNAILS),
|
||||
MENU_LABEL(TIMEDATE_ENABLE),
|
||||
MENU_LABEL(BATTERY_LEVEL_ENABLE),
|
||||
MENU_LABEL(MATERIALUI_MENU_COLOR_THEME),
|
||||
@ -1718,6 +1719,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_CB_LAKKA_DOWNLOAD,
|
||||
MENU_ENUM_LABEL_CB_LAKKA_LIST,
|
||||
MENU_ENUM_LABEL_CB_MENU_THUMBNAIL,
|
||||
MENU_ENUM_LABEL_CB_MENU_LEFT_THUMBNAIL,
|
||||
MENU_ENUM_LABEL_CB_MENU_SAVESTATE_THUMBNAIL,
|
||||
MENU_ENUM_LABEL_CB_MENU_WALLPAPER,
|
||||
MENU_ENUM_LABEL_CB_THUMBNAILS_UPDATER_DOWNLOAD,
|
||||
|
@ -700,6 +700,7 @@ video_message_bgcolor_opacity = 1.0
|
||||
|
||||
# Type of thumbnail to display. 0 = none, 1 = snaps, 2 = titles, 3 = boxarts
|
||||
# menu_thumbnails = 0
|
||||
# menu_left_thumbnails = 0
|
||||
|
||||
# Wrap-around to beginning and/or end if boundary of list is reached horizontally or vertically.
|
||||
# menu_navigation_wraparound_enable = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user