Style nits
This commit is contained in:
parent
64c7faf11b
commit
8e2e2cdbac
|
@ -3815,9 +3815,8 @@ static void ozone_update_savestate_thumbnail_path(void *data, unsigned i)
|
|||
static void ozone_update_savestate_thumbnail_image(void *data)
|
||||
{
|
||||
ozone_handle_t *ozone = (ozone_handle_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned thumbnail_upscale_threshold
|
||||
= settings->uints.gfx_thumbnail_upscale_threshold;
|
||||
unsigned thumbnail_upscale_threshold =
|
||||
config_get_ptr()->uints.gfx_thumbnail_upscale_threshold;
|
||||
|
||||
if ((!ozone) || (ozone->flags & OZONE_FLAG_SKIP_THUMBNAIL_RESET))
|
||||
return;
|
||||
|
@ -3849,10 +3848,10 @@ static void ozone_entries_update_thumbnail_bar(ozone_handle_t *ozone,
|
|||
bool is_playlist, bool allow_animation)
|
||||
{
|
||||
struct gfx_animation_ctx_entry entry;
|
||||
uintptr_t tag = (uintptr_t)&ozone->show_thumbnail_bar;
|
||||
uintptr_t tag = (uintptr_t)&ozone->show_thumbnail_bar;
|
||||
|
||||
if (!savestate_thumbnail)
|
||||
ozone->flags &= ~OZONE_FLAG_IS_STATE_SLOT;
|
||||
ozone->flags &= ~OZONE_FLAG_IS_STATE_SLOT;
|
||||
|
||||
entry.duration = ANIMATION_CURSOR_DURATION;
|
||||
entry.easing_enum = OZONE_EASING_XY;
|
||||
|
@ -8357,11 +8356,14 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||
/* Pressing left goes up but faster, so
|
||||
wiggle up to say that there is nothing more upwards
|
||||
even though the user pressed the left button */
|
||||
if (!menu_navigation_wraparound_enable && selection == 0 && !is_current_entry_settings)
|
||||
if ( !menu_navigation_wraparound_enable
|
||||
&& (selection == 0)
|
||||
&& !is_current_entry_settings)
|
||||
ozone_start_cursor_wiggle(ozone, MENU_ACTION_DOWN);
|
||||
|
||||
if ( (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS)
|
||||
&& ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && !menu_is_running_quick_menu()))
|
||||
&& ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU)
|
||||
&& !menu_is_running_quick_menu()))
|
||||
return MENU_ACTION_NOOP;
|
||||
|
||||
break;
|
||||
|
@ -8396,7 +8398,8 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||
|
||||
if ( (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS)
|
||||
&& ( (ozone->flags & OZONE_FLAG_IS_PLAYLIST)
|
||||
|| ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && !menu_is_running_quick_menu())))
|
||||
|| ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU)
|
||||
&& !menu_is_running_quick_menu())))
|
||||
return MENU_ACTION_NOOP;
|
||||
|
||||
break;
|
||||
|
@ -8522,7 +8525,8 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||
}
|
||||
|
||||
/* Return from manage playlist quick access back to sidebar */
|
||||
if ((ozone->flags2 & OZONE_FLAG2_PENDING_CURSOR_IN_SIDEBAR) && ozone->depth == 2)
|
||||
if ( (ozone->flags2 & OZONE_FLAG2_PENDING_CURSOR_IN_SIDEBAR)
|
||||
&& ozone->depth == 2)
|
||||
{
|
||||
ozone->flags2 &= ~OZONE_FLAG2_PENDING_CURSOR_IN_SIDEBAR;
|
||||
ozone->flags |= OZONE_FLAG_CURSOR_IN_SIDEBAR;
|
||||
|
@ -8550,7 +8554,7 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||
/* Alphabetical scroll */
|
||||
size_t l = ozone->sidebar_index_size - 1;
|
||||
|
||||
while (l
|
||||
while ( l
|
||||
&& ozone->sidebar_index_list[l - 1] >= tab_selection)
|
||||
l--;
|
||||
|
||||
|
@ -9150,8 +9154,8 @@ static bool ozone_init_font(
|
|||
if (wideglyph_str)
|
||||
{
|
||||
int wideglyph_width =
|
||||
font_driver_get_message_width(font_data->font, wideglyph_str, strlen(wideglyph_str), 1.0f);
|
||||
|
||||
font_driver_get_message_width(font_data->font,
|
||||
wideglyph_str, strlen(wideglyph_str), 1.0f);
|
||||
if (wideglyph_width > 0 && glyph_width > 0)
|
||||
font_data->wideglyph_width = wideglyph_width * 100 / glyph_width;
|
||||
}
|
||||
|
@ -9728,7 +9732,8 @@ static int ozone_list_push(void *data, void *userdata,
|
|||
else
|
||||
{
|
||||
rarch_system_info_t *sys_info = &runloop_state_get_ptr()->system;
|
||||
if (sys_info && sys_info->load_no_content)
|
||||
if ( sys_info
|
||||
&& sys_info->load_no_content)
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -9816,7 +9821,8 @@ static int ozone_list_push(void *data, void *userdata,
|
|||
#endif
|
||||
#if defined(HAVE_NETWORKING)
|
||||
#if defined(HAVE_ONLINE_UPDATER)
|
||||
if (settings->bools.menu_show_online_updater && !settings->bools.kiosk_mode_enable)
|
||||
if ( settings->bools.menu_show_online_updater
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -9827,7 +9833,8 @@ static int ozone_list_push(void *data, void *userdata,
|
|||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_MIST
|
||||
if (settings->bools.menu_show_core_manager_steam && !settings->bools.kiosk_mode_enable)
|
||||
if ( settings->bools.menu_show_core_manager_steam
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -9836,7 +9843,8 @@ static int ozone_list_push(void *data, void *userdata,
|
|||
false);
|
||||
}
|
||||
#endif
|
||||
if (!settings->bools.menu_content_show_settings && !string_is_empty(settings->paths.menu_content_show_settings_password))
|
||||
if ( !settings->bools.menu_content_show_settings
|
||||
&& !string_is_empty(settings->paths.menu_content_show_settings_password))
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -9845,7 +9853,8 @@ static int ozone_list_push(void *data, void *userdata,
|
|||
false);
|
||||
}
|
||||
|
||||
if (settings->bools.kiosk_mode_enable && !string_is_empty(settings->paths.kiosk_mode_password))
|
||||
if ( settings->bools.kiosk_mode_enable
|
||||
&& !string_is_empty(settings->paths.kiosk_mode_password))
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -9871,7 +9880,8 @@ static int ozone_list_push(void *data, void *userdata,
|
|||
false);
|
||||
#endif
|
||||
|
||||
if (settings->bools.menu_show_configurations && !settings->bools.kiosk_mode_enable)
|
||||
if ( settings->bools.menu_show_configurations
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -10136,7 +10146,8 @@ static void ozone_render(void *data,
|
|||
|| (ozone->pointer.flags & MENU_INP_PTR_FLG_PRESSED))
|
||||
{
|
||||
if ((ozone->flags & OZONE_FLAG_DRAW_SIDEBAR)
|
||||
&& (ozone->pointer.x < ozone->dimensions_sidebar_width + ozone->sidebar_offset))
|
||||
&& (ozone->pointer.x < ozone->dimensions_sidebar_width
|
||||
+ ozone->sidebar_offset))
|
||||
ozone->flags2 |= OZONE_FLAG2_POINTER_IN_SIDEBAR;
|
||||
else
|
||||
ozone->flags2 &= ~OZONE_FLAG2_POINTER_IN_SIDEBAR;
|
||||
|
@ -10300,7 +10311,8 @@ static void ozone_render(void *data,
|
|||
menu_st->selection_ptr = i;
|
||||
|
||||
/* If this is a playlist, must update thumbnails */
|
||||
if ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) && (ozone->depth == 1 || ozone->depth == 3))
|
||||
if ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST)
|
||||
&& (ozone->depth == 1 || ozone->depth == 3))
|
||||
|| (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST))
|
||||
{
|
||||
ozone->flags &= ~OZONE_FLAG_SKIP_THUMBNAIL_RESET;
|
||||
|
@ -10308,7 +10320,8 @@ static void ozone_render(void *data,
|
|||
ozone_update_thumbnail_image(ozone);
|
||||
}
|
||||
/* Also savestate thumbnails need updating */
|
||||
else if (((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && ozone->depth >= 2)
|
||||
else if (((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU)
|
||||
&& ozone->depth >= 2)
|
||||
|| (ozone->flags & OZONE_FLAG_IS_STATE_SLOT))
|
||||
{
|
||||
ozone_update_savestate_thumbnail_path(ozone, (unsigned)i);
|
||||
|
@ -10410,7 +10423,8 @@ static void ozone_render(void *data,
|
|||
}
|
||||
|
||||
/* Handle any pending thumbnail load requests */
|
||||
if (ozone->show_thumbnail_bar && (ozone->thumbnails.pending != OZONE_PENDING_THUMBNAIL_NONE))
|
||||
if ( ozone->show_thumbnail_bar
|
||||
&& (ozone->thumbnails.pending != OZONE_PENDING_THUMBNAIL_NONE))
|
||||
{
|
||||
size_t selection = menu_st->selection_ptr;
|
||||
playlist_t *playlist = playlist_get_cached();
|
||||
|
@ -10802,8 +10816,9 @@ static void ozone_draw_footer(
|
|||
ozone->footer_labels.fullscreen_thumbnails.show
|
||||
&& !ozone->footer_labels.random_select.show
|
||||
&& !(ozone->flags & OZONE_FLAG_IS_FILE_LIST)
|
||||
&& !(((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && menu_is_running_quick_menu())
|
||||
|| (ozone->flags & OZONE_FLAG_IS_STATE_SLOT));
|
||||
&& !(((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU)
|
||||
&& menu_is_running_quick_menu())
|
||||
|| (ozone->flags & OZONE_FLAG_IS_STATE_SLOT));
|
||||
|
||||
ozone->footer_labels.cycle_thumbnails.show |=
|
||||
(ozone->flags2 & OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS)
|
||||
|
@ -10831,9 +10846,10 @@ static void ozone_draw_footer(
|
|||
|
||||
ozone->footer_labels.search.show =
|
||||
!settings->bools.menu_disable_search_button
|
||||
&& !((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && !menu_is_running_quick_menu())
|
||||
&& !(ozone->flags2 & OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS)
|
||||
&& !(ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS);
|
||||
&& !((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU)
|
||||
&& !menu_is_running_quick_menu())
|
||||
&& !(ozone->flags2 & OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS)
|
||||
&& !(ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS);
|
||||
|
||||
ozone->footer_labels.resume.show =
|
||||
!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL);
|
||||
|
@ -10861,18 +10877,30 @@ static void ozone_draw_footer(
|
|||
|
||||
if (input_menu_swap_ok_cancel_buttons)
|
||||
{
|
||||
ozone->footer_labels.back.x = ozone->footer_labels.resume.x - ozone->footer_labels.back.width - icon_spacer;
|
||||
ozone->footer_labels.ok.x = ozone->footer_labels.back.x - ozone->footer_labels.ok.width - icon_spacer;
|
||||
ozone->footer_labels.back.x = ozone->footer_labels.resume.x
|
||||
- ozone->footer_labels.back.width
|
||||
- icon_spacer;
|
||||
ozone->footer_labels.ok.x = ozone->footer_labels.back.x
|
||||
- ozone->footer_labels.ok.width
|
||||
- icon_spacer;
|
||||
}
|
||||
else
|
||||
{
|
||||
ozone->footer_labels.ok.x = ozone->footer_labels.resume.x - ozone->footer_labels.ok.width - icon_spacer;
|
||||
ozone->footer_labels.back.x = ozone->footer_labels.ok.x - ozone->footer_labels.back.width - icon_spacer;
|
||||
ozone->footer_labels.ok.x = ozone->footer_labels.resume.x
|
||||
- ozone->footer_labels.ok.width
|
||||
- icon_spacer;
|
||||
ozone->footer_labels.back.x = ozone->footer_labels.ok.x
|
||||
- ozone->footer_labels.back.width
|
||||
- icon_spacer;
|
||||
}
|
||||
|
||||
ozone->footer_labels.search.x = (ozone->footer_labels.search.show)
|
||||
? ((input_menu_swap_ok_cancel_buttons) ? ozone->footer_labels.ok.x : ozone->footer_labels.back.x) - ozone->footer_labels.search.width - icon_spacer
|
||||
: ((input_menu_swap_ok_cancel_buttons) ? ozone->footer_labels.ok.x : ozone->footer_labels.back.x);
|
||||
? ((input_menu_swap_ok_cancel_buttons)
|
||||
? ozone->footer_labels.ok.x : ozone->footer_labels.back.x)
|
||||
- ozone->footer_labels.search.width
|
||||
- icon_spacer
|
||||
: ((input_menu_swap_ok_cancel_buttons)
|
||||
? ozone->footer_labels.ok.x : ozone->footer_labels.back.x);
|
||||
|
||||
ozone->footer_labels.cycle_thumbnails.x = (ozone->footer_labels.cycle_thumbnails.show)
|
||||
? ozone->footer_labels.search.x - ozone->footer_labels.cycle_thumbnails.width - icon_spacer
|
||||
|
@ -12169,22 +12197,18 @@ static void ozone_populate_entries(
|
|||
unsigned k)
|
||||
{
|
||||
int new_depth = 0;
|
||||
bool ozone_collapse_sidebar = false;
|
||||
bool was_db_manager_list = false;
|
||||
bool want_thumbnail_bar = false;
|
||||
bool fs_thumbnails_available = false;
|
||||
bool animate = false;
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
menu_list_t *menu_list = menu_st->entries.list;
|
||||
settings_t *settings = NULL;
|
||||
bool ozone_collapse_sidebar = config_get_ptr()->bools.ozone_collapse_sidebar;
|
||||
ozone_handle_t *ozone = (ozone_handle_t*) data;
|
||||
|
||||
if (!ozone)
|
||||
return;
|
||||
|
||||
settings = config_get_ptr();
|
||||
ozone_collapse_sidebar = settings->bools.ozone_collapse_sidebar;
|
||||
|
||||
if ((menu_st->flags & MENU_ST_FLAG_PREVENT_POPULATE) > 0)
|
||||
{
|
||||
menu_st->flags &= ~MENU_ST_FLAG_PREVENT_POPULATE;
|
||||
|
@ -12253,7 +12277,8 @@ static void ozone_populate_entries(
|
|||
ozone->last_onscreen_entry = 0;
|
||||
|
||||
new_depth = (int)ozone_list_get_size(ozone, MENU_LIST_PLAIN);
|
||||
was_db_manager_list = (ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST) && new_depth > ozone->depth;
|
||||
was_db_manager_list = (ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST)
|
||||
&& new_depth > ozone->depth;
|
||||
|
||||
animate = new_depth != ozone->depth;
|
||||
|
||||
|
@ -12471,9 +12496,9 @@ static void ozone_populate_entries(
|
|||
|
||||
static void ozone_toggle(void *userdata, bool menu_on)
|
||||
{
|
||||
settings_t *settings = NULL;
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
ozone_handle_t *ozone = (ozone_handle_t*)userdata;
|
||||
bool ozone_collapse_sidebar = config_get_ptr()->bools.ozone_collapse_sidebar;
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
ozone_handle_t *ozone = (ozone_handle_t*)userdata;
|
||||
|
||||
if (!ozone)
|
||||
return;
|
||||
|
@ -12490,7 +12515,6 @@ static void ozone_toggle(void *userdata, bool menu_on)
|
|||
ozone_update_savestate_thumbnail_image(ozone);
|
||||
}
|
||||
|
||||
settings = config_get_ptr();
|
||||
if (MENU_ENTRIES_NEEDS_REFRESH(menu_st))
|
||||
menu_st->flags &= ~MENU_ST_FLAG_PREVENT_POPULATE;
|
||||
else
|
||||
|
@ -12502,7 +12526,7 @@ static void ozone_toggle(void *userdata, bool menu_on)
|
|||
ozone->sidebar_offset = 0.0f;
|
||||
}
|
||||
|
||||
ozone_sidebar_update_collapse(ozone, settings->bools.ozone_collapse_sidebar, false);
|
||||
ozone_sidebar_update_collapse(ozone, ozone_collapse_sidebar, false);
|
||||
}
|
||||
|
||||
static bool ozone_menu_init_list(void *data)
|
||||
|
|
|
@ -561,8 +561,7 @@ static void xmb_calculate_visible_range(const xmb_handle_t *xmb,
|
|||
|
||||
const char* xmb_theme_ident(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned menu_xmb_theme = settings->uints.menu_xmb_theme;
|
||||
unsigned menu_xmb_theme = config_get_ptr()->uints.menu_xmb_theme;
|
||||
|
||||
switch (menu_xmb_theme)
|
||||
{
|
||||
|
@ -1715,8 +1714,7 @@ static void xmb_set_dynamic_icon_content(
|
|||
static void xmb_update_savestate_thumbnail_image(void *data)
|
||||
{
|
||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned upscale_threshold = settings->uints.gfx_thumbnail_upscale_threshold;
|
||||
unsigned upscale_threshold = config_get_ptr()->uints.gfx_thumbnail_upscale_threshold;
|
||||
|
||||
if (!xmb || xmb->skip_thumbnail_reset)
|
||||
return;
|
||||
|
@ -1730,7 +1728,8 @@ static void xmb_update_savestate_thumbnail_image(void *data)
|
|||
* > Thumbnail has never been loaded *OR*
|
||||
* > Thumbnail path has changed */
|
||||
if ( (xmb->thumbnails.savestate.status == GFX_THUMBNAIL_STATUS_UNKNOWN)
|
||||
|| !string_is_equal(xmb->savestate_thumbnail_file_path, xmb->prev_savestate_thumbnail_file_path))
|
||||
|| !string_is_equal(xmb->savestate_thumbnail_file_path,
|
||||
xmb->prev_savestate_thumbnail_file_path))
|
||||
gfx_thumbnail_request_file(
|
||||
xmb->savestate_thumbnail_file_path,
|
||||
&xmb->thumbnails.savestate,
|
||||
|
@ -1740,7 +1739,8 @@ static void xmb_update_savestate_thumbnail_image(void *data)
|
|||
xmb->thumbnails.savestate.flags |= GFX_THUMB_FLAG_CORE_ASPECT;
|
||||
}
|
||||
|
||||
/* Is called when the pointer position changes within a list/sub-list (vertically) */
|
||||
/* Is called when the pointer position changes
|
||||
* within a list/sub-list (vertically) */
|
||||
static void xmb_selection_pointer_changed(
|
||||
xmb_handle_t *xmb, bool allow_animations)
|
||||
{
|
||||
|
@ -1752,8 +1752,7 @@ static void xmb_selection_pointer_changed(
|
|||
file_list_t *selection_buf = MENU_LIST_GET_SELECTION(menu_list, 0);
|
||||
uintptr_t tag = (uintptr_t)selection_buf;
|
||||
size_t selection = menu_st->selection_ptr;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned anim_move_up_down = settings->uints.menu_xmb_animation_move_up_down;
|
||||
unsigned anim_move_up_down = config_get_ptr()->uints.menu_xmb_animation_move_up_down;
|
||||
|
||||
if (anim_move_up_down > 1)
|
||||
allow_animations = false;
|
||||
|
@ -1826,8 +1825,8 @@ static void xmb_selection_pointer_changed(
|
|||
(unsigned long)list_size);
|
||||
}
|
||||
|
||||
ia = xmb->items_active_alpha;
|
||||
iz = xmb->items_active_zoom;
|
||||
ia = xmb->items_active_alpha;
|
||||
iz = xmb->items_active_zoom;
|
||||
|
||||
if ( gfx_thumbnail_is_enabled(menu_st->thumbnail_path_data, GFX_THUMBNAIL_RIGHT)
|
||||
|| gfx_thumbnail_is_enabled(menu_st->thumbnail_path_data, GFX_THUMBNAIL_LEFT))
|
||||
|
@ -1849,9 +1848,7 @@ static void xmb_selection_pointer_changed(
|
|||
xmb->skip_thumbnail_reset = false;
|
||||
}
|
||||
else if (xmb->is_db_manager_list && depth == 5)
|
||||
{
|
||||
xmb->skip_thumbnail_reset = true;
|
||||
}
|
||||
/* Filebrowser image updates */
|
||||
else if (xmb->is_file_list)
|
||||
{
|
||||
|
@ -1941,13 +1938,12 @@ static void xmb_selection_pointer_changed(
|
|||
}
|
||||
|
||||
static void xmb_list_open_old(xmb_handle_t *xmb,
|
||||
bool horizontal_animation,
|
||||
file_list_t *list, int dir, size_t current)
|
||||
{
|
||||
unsigned i, height;
|
||||
int threshold = xmb->icon_size * 10;
|
||||
size_t end = list ? list->size : 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool horizontal_animation = settings->bools.menu_horizontal_animation;
|
||||
|
||||
video_driver_get_size(NULL, &height);
|
||||
|
||||
|
@ -2005,16 +2001,15 @@ static void xmb_list_open_old(xmb_handle_t *xmb,
|
|||
}
|
||||
|
||||
static void xmb_list_open_new(xmb_handle_t *xmb,
|
||||
bool horizontal_animation,
|
||||
bool savestate_thumbnail,
|
||||
file_list_t *list, int dir, size_t current)
|
||||
{
|
||||
unsigned i, height;
|
||||
size_t skip = 0;
|
||||
int threshold = xmb->icon_size * 10;
|
||||
size_t end = list ? list->size : 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
bool horizontal_animation = settings->bools.menu_horizontal_animation;
|
||||
bool savestate_thumbnail = settings->bools.savestate_thumbnail_enable;
|
||||
|
||||
video_driver_get_size(NULL, &height);
|
||||
|
||||
|
@ -2484,7 +2479,7 @@ static void xmb_list_switch(xmb_handle_t *xmb)
|
|||
bool xmb_main_tab_selected = false;
|
||||
bool horizontal_animation = settings->bools.menu_horizontal_animation;
|
||||
unsigned animation_horizontal_highlight
|
||||
= settings->uints.menu_xmb_animation_horizontal_highlight;
|
||||
= settings->uints.menu_xmb_animation_horizontal_highlight;
|
||||
|
||||
if (xmb->categories_selection_ptr > xmb->categories_selection_ptr_old)
|
||||
dir = 1;
|
||||
|
@ -2897,18 +2892,17 @@ static int xmb_environ(enum menu_environ_cb type, void *data, void *userdata)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void xmb_list_open(xmb_handle_t *xmb)
|
||||
static void xmb_list_open(xmb_handle_t *xmb,
|
||||
unsigned animation_opening_main_menu,
|
||||
bool horizontal_animation,
|
||||
bool st_thumbnail_enable)
|
||||
{
|
||||
gfx_animation_ctx_entry_t entry;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
menu_list_t *menu_list = menu_st->entries.list;
|
||||
file_list_t *selection_buf = MENU_LIST_GET_SELECTION(menu_list, 0);
|
||||
size_t selection = menu_st->selection_ptr;
|
||||
int dir = 0;
|
||||
unsigned animation_opening_main_menu
|
||||
= settings->uints.menu_xmb_animation_opening_main_menu;
|
||||
bool horizontal_animation = settings->bools.menu_horizontal_animation;
|
||||
|
||||
xmb->depth = (int)xmb_list_get_size(xmb, MENU_LIST_PLAIN);
|
||||
|
||||
|
@ -2920,8 +2914,10 @@ static void xmb_list_open(xmb_handle_t *xmb)
|
|||
return; /* If menu hasn't changed, do nothing */
|
||||
|
||||
xmb_list_open_horizontal_list(xmb, horizontal_animation);
|
||||
xmb_list_open_old(xmb, &xmb->selection_buf_old, dir, xmb->selection_ptr_old);
|
||||
xmb_list_open_new(xmb, selection_buf, dir, selection);
|
||||
xmb_list_open_old(xmb, horizontal_animation,
|
||||
&xmb->selection_buf_old, dir, xmb->selection_ptr_old);
|
||||
xmb_list_open_new(xmb, horizontal_animation, st_thumbnail_enable,
|
||||
selection_buf, dir, selection);
|
||||
|
||||
/* Main Menu opening animation */
|
||||
entry.target_value = xmb->icon_size * -(xmb->depth * 2 - 2);
|
||||
|
@ -2974,17 +2970,14 @@ static void xmb_list_open(xmb_handle_t *xmb)
|
|||
|
||||
/* Is called whenever the list/sub-list changes */
|
||||
static void xmb_populate_entries(void *data,
|
||||
const char *path,
|
||||
const char *label,
|
||||
unsigned k)
|
||||
const char *path, const char *label, unsigned k)
|
||||
{
|
||||
unsigned xmb_system_tab, xmb_horizontal_type;
|
||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
menu_list_t *menu_list = menu_st->entries.list;
|
||||
bool show_entry_idx = settings
|
||||
? settings->bools.playlist_show_entry_idx : false;
|
||||
bool playlist_show_entry_idx = settings->bools.playlist_show_entry_idx;
|
||||
bool was_db_manager_list = false;
|
||||
int depth = (unsigned)xmb_list_get_size(xmb, MENU_LIST_PLAIN);
|
||||
|
||||
|
@ -2996,7 +2989,8 @@ static void xmb_populate_entries(void *data,
|
|||
xmb->skip_thumbnail_reset = true;
|
||||
|
||||
xmb_system_tab = xmb_get_system_tab(xmb, (unsigned)xmb->categories_selection_ptr);
|
||||
xmb_horizontal_type = ((xmb_system_tab == UINT_MAX) ? xmb_get_horizontal_selection_type(xmb) : 0);
|
||||
xmb_horizontal_type = ((xmb_system_tab == UINT_MAX)
|
||||
? xmb_get_horizontal_selection_type(xmb) : 0);
|
||||
|
||||
/* Determine whether this is a playlist */
|
||||
xmb->is_playlist =
|
||||
|
@ -3029,7 +3023,8 @@ static void xmb_populate_entries(void *data,
|
|||
&& !string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INFORMATION))
|
||||
&& !string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RDB_ENTRY_DETAIL));
|
||||
|
||||
xmb->is_playlist_tab = !xmb->is_playlist && string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
xmb->is_playlist_tab = !xmb->is_playlist && string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));
|
||||
|
||||
xmb->is_playlist_information =
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INFORMATION))
|
||||
|
@ -3037,7 +3032,8 @@ static void xmb_populate_entries(void *data,
|
|||
|
||||
/* Determine whether this is a database manager list */
|
||||
was_db_manager_list = xmb->is_db_manager_list && depth >= 4;
|
||||
xmb->is_db_manager_list = string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST));
|
||||
xmb->is_db_manager_list = string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST));
|
||||
|
||||
if (was_db_manager_list)
|
||||
{
|
||||
|
@ -3047,8 +3043,10 @@ static void xmb_populate_entries(void *data,
|
|||
|
||||
/* Determine whether this is the contentless cores menu */
|
||||
xmb->is_contentless_cores =
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENTLESS_CORES_TAB))
|
||||
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CONTENTLESS_CORES_LIST));
|
||||
string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CONTENTLESS_CORES_TAB))
|
||||
|| string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CONTENTLESS_CORES_LIST));
|
||||
|
||||
/* Determine whether this is a 'file list'
|
||||
* (needed for handling thumbnails when viewing images
|
||||
|
@ -3062,17 +3060,22 @@ static void xmb_populate_entries(void *data,
|
|||
|
||||
/* Determine whether this is the quick menu */
|
||||
xmb->is_quick_menu =
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS))
|
||||
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS))
|
||||
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_LIST));
|
||||
string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS))
|
||||
|| string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS))
|
||||
|| string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_LIST));
|
||||
|
||||
xmb->is_state_slot = string_to_unsigned(path) == MENU_ENUM_LABEL_STATE_SLOT;
|
||||
|
||||
#if defined(HAVE_LIBRETRODB)
|
||||
/* Explore list */
|
||||
xmb->is_explore_list =
|
||||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST))
|
||||
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_TAB))
|
||||
string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST))
|
||||
|| string_is_equal(label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_TAB))
|
||||
|| xmb_horizontal_type == MENU_EXPLORE_TAB;
|
||||
|
||||
if (xmb->is_explore_list)
|
||||
|
@ -3083,9 +3086,12 @@ static void xmb_populate_entries(void *data,
|
|||
menu_entry_get(&entry, 0, 0, NULL, true);
|
||||
|
||||
/* Quick Menu under Explore list must also be Quick Menu */
|
||||
if ( string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_RUN))
|
||||
|| string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_RESUME_CONTENT))
|
||||
|| string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_STATE_SLOT))
|
||||
if ( string_is_equal(entry.label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_RUN))
|
||||
|| string_is_equal(entry.label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_RESUME_CONTENT))
|
||||
|| string_is_equal(entry.label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_STATE_SLOT))
|
||||
)
|
||||
{
|
||||
xmb->is_quick_menu = true;
|
||||
|
@ -3113,7 +3119,10 @@ static void xmb_populate_entries(void *data,
|
|||
if (xmb->categories_selection_ptr != xmb->categories_active_idx_old)
|
||||
xmb_list_switch(xmb);
|
||||
else
|
||||
xmb_list_open(xmb);
|
||||
xmb_list_open(xmb,
|
||||
settings->uints.menu_xmb_animation_opening_main_menu,
|
||||
settings->bools.menu_horizontal_animation,
|
||||
settings->bools.savestate_thumbnail_enable);
|
||||
|
||||
xmb_set_title(xmb);
|
||||
|
||||
|
@ -3135,7 +3144,7 @@ static void xmb_populate_entries(void *data,
|
|||
|
||||
/* Determine whether to show entry index */
|
||||
xmb->entry_index_str[0] = '\0';
|
||||
xmb->entry_idx_enabled = show_entry_idx;
|
||||
xmb->entry_idx_enabled = playlist_show_entry_idx;
|
||||
|
||||
if ( !xmb->is_quick_menu
|
||||
&& (xmb->is_playlist || xmb->is_explore_list))
|
||||
|
@ -3143,7 +3152,8 @@ static void xmb_populate_entries(void *data,
|
|||
size_t entry_idx_selection = menu_st->selection_ptr + 1;
|
||||
size_t list_size = MENU_LIST_GET_SELECTION(menu_list, 0)->size;
|
||||
unsigned entry_idx_offset = 0;
|
||||
show_entry_idx = (xmb->is_playlist || xmb->is_explore_list) ? show_entry_idx : false;
|
||||
playlist_show_entry_idx = (xmb->is_playlist || xmb->is_explore_list)
|
||||
? playlist_show_entry_idx : false;
|
||||
|
||||
if (xmb->is_explore_list)
|
||||
{
|
||||
|
@ -3155,7 +3165,7 @@ static void xmb_populate_entries(void *data,
|
|||
if (entry_idx_selection > entry_idx_offset)
|
||||
entry_idx_selection -= entry_idx_offset;
|
||||
else
|
||||
show_entry_idx = false;
|
||||
playlist_show_entry_idx = false;
|
||||
|
||||
if (list_size >= entry_idx_offset)
|
||||
list_size -= entry_idx_offset;
|
||||
|
@ -3164,7 +3174,7 @@ static void xmb_populate_entries(void *data,
|
|||
xmb->list_size = list_size;
|
||||
xmb->entry_index_offset = entry_idx_offset;
|
||||
|
||||
if (!show_entry_idx)
|
||||
if (!playlist_show_entry_idx)
|
||||
xmb->entry_index_str[0] = '\0';
|
||||
else
|
||||
snprintf(xmb->entry_index_str, sizeof(xmb->entry_index_str),
|
||||
|
@ -5841,54 +5851,57 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
|
|||
float scale_factor = xmb->last_scale_factor;
|
||||
float margins_title = xmb->margins_title;
|
||||
float margins_title_h_offset = xmb->margins_title_horizontal_offset;
|
||||
unsigned new_font_size = 32.0 * scale_factor;
|
||||
unsigned new_font_size = 32 * scale_factor;
|
||||
|
||||
xmb->above_subitem_offset = 1.5;
|
||||
xmb->above_item_offset = -1.0;
|
||||
xmb->active_item_factor = 3.0;
|
||||
xmb->under_item_offset = 5.0;
|
||||
xmb->above_subitem_offset = 1.5f;
|
||||
xmb->above_item_offset = -1.0f;
|
||||
xmb->active_item_factor = 3.0f;
|
||||
xmb->under_item_offset = 5.0f;
|
||||
|
||||
xmb->categories_active_zoom = 1.0;
|
||||
xmb->categories_passive_zoom = 0.5;
|
||||
xmb->items_active_zoom = 1.0;
|
||||
xmb->items_passive_zoom = 0.5;
|
||||
xmb->categories_active_zoom = 1.0f;
|
||||
xmb->categories_passive_zoom = 0.5f;
|
||||
xmb->items_active_zoom = 1.0f;
|
||||
xmb->items_passive_zoom = 0.5f;
|
||||
|
||||
xmb->categories_active_alpha = 1.0;
|
||||
xmb->categories_passive_alpha = 0.75;
|
||||
xmb->items_active_alpha = 1.0;
|
||||
xmb->items_passive_alpha = 0.75;
|
||||
xmb->categories_active_alpha = 1.0f;
|
||||
xmb->categories_passive_alpha = 0.75f;
|
||||
xmb->items_active_alpha = 1.0f;
|
||||
xmb->items_passive_alpha = 0.75f;
|
||||
|
||||
xmb->shadow_offset = 4.0 * scale_factor;
|
||||
xmb->shadow_offset = 4.0f * scale_factor;
|
||||
if (xmb->shadow_offset < 1.0)
|
||||
xmb->shadow_offset = 1.0;
|
||||
xmb->shadow_offset = 1.0f;
|
||||
if (xmb->shadow_offset > 2.0)
|
||||
xmb->shadow_offset = 2.0;
|
||||
xmb->shadow_offset = 2.0f;
|
||||
|
||||
xmb->font_size = new_font_size;
|
||||
xmb->font2_size = 22.0 * scale_factor;
|
||||
xmb->font2_size = 22.0f * scale_factor;
|
||||
|
||||
/* Limit minimum font size */
|
||||
xmb->font_size = (xmb->font_size < 7) ? 7 : xmb->font_size;
|
||||
xmb->font2_size = (xmb->font2_size < 6) ? 6 : xmb->font2_size;
|
||||
xmb->font_size = (xmb->font_size < 7) ? 7.0f : xmb->font_size;
|
||||
xmb->font2_size = (xmb->font2_size < 6) ? 6.0f : xmb->font2_size;
|
||||
|
||||
xmb->cursor_size = 64.0 * scale_factor;
|
||||
xmb->icon_size = 128.0 * scale_factor;
|
||||
xmb->icon_spacing_horizontal = 200.0 * scale_factor;
|
||||
xmb->icon_spacing_vertical = 64.0 * scale_factor;
|
||||
xmb->cursor_size = 64.0f * scale_factor;
|
||||
xmb->icon_size = 128.0f * scale_factor;
|
||||
xmb->icon_spacing_horizontal = 200.0f * scale_factor;
|
||||
xmb->icon_spacing_vertical = 64.0f * scale_factor;
|
||||
|
||||
xmb->margins_screen_top = (256 + 16) * scale_factor;
|
||||
xmb->margins_screen_left = 336.0 * scale_factor;
|
||||
xmb->margins_screen_left = 336.0f * scale_factor;
|
||||
|
||||
xmb->margins_title_left = (margins_title * scale_factor) + (4 * scale_factor) + (margins_title_h_offset * scale_factor);
|
||||
xmb->margins_title_top = (margins_title * scale_factor) + (new_font_size - (new_font_size / 6) * scale_factor);
|
||||
xmb->margins_title_left = (margins_title * scale_factor)
|
||||
+ (4 * scale_factor)
|
||||
+ (margins_title_h_offset * scale_factor);
|
||||
xmb->margins_title_top = (margins_title * scale_factor)
|
||||
+ (new_font_size - (new_font_size / 6) * scale_factor);
|
||||
xmb->margins_title_bottom = (margins_title * scale_factor) + (4 * scale_factor);
|
||||
|
||||
xmb->margins_label_left = 85.0 * scale_factor;
|
||||
xmb->margins_label_top = new_font_size / 3.0;
|
||||
xmb->margins_label_left = 85.0f * scale_factor;
|
||||
xmb->margins_label_top = new_font_size / 3.0f;
|
||||
|
||||
xmb->margins_setting_left = 670.0 * scale_factor * xmb_scale_mod[6];
|
||||
xmb->margins_dialog = new_font_size * 2.0;
|
||||
xmb->margins_slice = new_font_size / 2.0;
|
||||
xmb->margins_setting_left = 670.0f * scale_factor * xmb_scale_mod[6];
|
||||
xmb->margins_dialog = new_font_size * 2.0f;
|
||||
xmb->margins_slice = new_font_size / 2.0f;
|
||||
}
|
||||
|
||||
static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
||||
|
@ -5896,31 +5909,31 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
|||
float scale_factor = xmb->last_scale_factor;
|
||||
float margins_title = xmb->margins_title;
|
||||
float margins_title_h_offset = xmb->margins_title_horizontal_offset;
|
||||
unsigned new_font_size = 26.0 * scale_factor;
|
||||
unsigned new_font_size = 26 * scale_factor;
|
||||
|
||||
xmb->above_subitem_offset = 1.5;
|
||||
xmb->above_item_offset = -1.0;
|
||||
xmb->active_item_factor = 2.0;
|
||||
xmb->under_item_offset = 3.0;
|
||||
xmb->above_subitem_offset = 1.5f;
|
||||
xmb->above_item_offset = -1.0f;
|
||||
xmb->active_item_factor = 2.0f;
|
||||
xmb->under_item_offset = 3.0f;
|
||||
|
||||
xmb->categories_active_zoom = 1.0;
|
||||
xmb->categories_passive_zoom = 0.5;
|
||||
xmb->items_active_zoom = 1.0;
|
||||
xmb->items_passive_zoom = 0.5;
|
||||
xmb->categories_active_zoom = 1.0f;
|
||||
xmb->categories_passive_zoom = 0.5f;
|
||||
xmb->items_active_zoom = 1.0f;
|
||||
xmb->items_passive_zoom = 0.5f;
|
||||
|
||||
xmb->categories_active_alpha = 1.0;
|
||||
xmb->categories_passive_alpha = 0.75;
|
||||
xmb->items_active_alpha = 1.0;
|
||||
xmb->items_passive_alpha = 0.75;
|
||||
|
||||
xmb->shadow_offset = 4.0 * scale_factor;
|
||||
xmb->shadow_offset = 4.0f * scale_factor;
|
||||
if (xmb->shadow_offset < 1.0)
|
||||
xmb->shadow_offset = 1.0;
|
||||
xmb->shadow_offset = 1.0f;
|
||||
if (xmb->shadow_offset > 2.0)
|
||||
xmb->shadow_offset = 2.0;
|
||||
xmb->shadow_offset = 2.0f;
|
||||
|
||||
xmb->font_size = new_font_size;
|
||||
xmb->font2_size = 18.0 * scale_factor;
|
||||
xmb->font2_size = 18.0f * scale_factor;
|
||||
|
||||
/* Limit minimum font size */
|
||||
xmb->font_size = (xmb->font_size < 7) ? 7 : xmb->font_size;
|
||||
|
@ -5934,16 +5947,20 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width)
|
|||
xmb->margins_screen_top = (256 + 16) * scale_factor;
|
||||
xmb->margins_screen_left = 136.0 * scale_factor;
|
||||
|
||||
xmb->margins_title_left = (margins_title * scale_factor) + (4 * scale_factor) + (margins_title_h_offset * scale_factor);
|
||||
xmb->margins_title_top = (margins_title * scale_factor) + (new_font_size - (new_font_size / 6) * scale_factor);
|
||||
xmb->margins_title_bottom = (margins_title * scale_factor) + (4 * scale_factor);
|
||||
xmb->margins_title_left = (margins_title * scale_factor)
|
||||
+ (4 * scale_factor)
|
||||
+ (margins_title_h_offset * scale_factor);
|
||||
xmb->margins_title_top = (margins_title * scale_factor)
|
||||
+ (new_font_size - (new_font_size / 6) * scale_factor);
|
||||
xmb->margins_title_bottom = (margins_title * scale_factor)
|
||||
+ (4 * scale_factor);
|
||||
|
||||
xmb->margins_label_left = 85.0 * scale_factor;
|
||||
xmb->margins_label_top = new_font_size / 3.0;
|
||||
xmb->margins_label_left = 85.0f * scale_factor;
|
||||
xmb->margins_label_top = new_font_size / 3.0f;
|
||||
|
||||
xmb->margins_setting_left = 540.0 * scale_factor * xmb_scale_mod[6];
|
||||
xmb->margins_dialog = new_font_size * 2.0;
|
||||
xmb->margins_slice = new_font_size / 2.0;
|
||||
xmb->margins_setting_left = 540.0f * scale_factor * xmb_scale_mod[6];
|
||||
xmb->margins_dialog = new_font_size * 2.0f;
|
||||
xmb->margins_slice = new_font_size / 2.0f;
|
||||
}
|
||||
|
||||
static void xmb_init_scale_mod(float scale_value)
|
||||
|
@ -6323,17 +6340,21 @@ static bool xmb_context_reset_textures(
|
|||
/* Use Ozone sidebar icon for netplay icon instead if it exists */
|
||||
const char *texture_path = xmb_texture_path(i);
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (i == XMB_TEXTURE_NETPLAY && menu_xmb_theme == XMB_ICON_THEME_MONOCHROME)
|
||||
if ( (i == XMB_TEXTURE_NETPLAY)
|
||||
&& (menu_xmb_theme == XMB_ICON_THEME_MONOCHROME))
|
||||
{
|
||||
char texpath[PATH_MAX_LENGTH];
|
||||
fill_pathname_join_special(texpath,
|
||||
iconpath, xmb_texture_path(XMB_TEXTURE_NETPLAY_ALT), sizeof(texpath));
|
||||
iconpath, xmb_texture_path(XMB_TEXTURE_NETPLAY_ALT),
|
||||
sizeof(texpath));
|
||||
if (path_is_valid(texpath))
|
||||
texture_path = xmb_texture_path(XMB_TEXTURE_NETPLAY_ALT);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!gfx_display_reset_textures_list(texture_path, iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
|
||||
if (!gfx_display_reset_textures_list(texture_path, iconpath,
|
||||
&xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR,
|
||||
NULL, NULL))
|
||||
{
|
||||
/* New extra battery icons could be missing */
|
||||
if ( i == XMB_TEXTURE_BATTERY_80
|
||||
|
@ -6342,19 +6363,26 @@ static bool xmb_context_reset_textures(
|
|||
|| i == XMB_TEXTURE_BATTERY_20)
|
||||
{
|
||||
/* If there are no extra battery icons revert to the old behaviour */
|
||||
if ( !gfx_display_reset_textures_list(xmb_texture_path(XMB_TEXTURE_BATTERY_FULL), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
if ( !gfx_display_reset_textures_list(
|
||||
xmb_texture_path(XMB_TEXTURE_BATTERY_FULL),
|
||||
iconpath, &xmb->textures.list[i],
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
&& !(menu_xmb_theme == XMB_ICON_THEME_CUSTOM))
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If the icon is missing return the subsetting (because some themes are incomplete) */
|
||||
/* If the icon is missing return the subsetting
|
||||
* (because some themes are incomplete) */
|
||||
if ( !( i == XMB_TEXTURE_DIALOG_SLICE
|
||||
|| i == XMB_TEXTURE_KEY_HOVER
|
||||
|| i == XMB_TEXTURE_KEY))
|
||||
{
|
||||
/* OSD Warning only if subsetting icon is missing */
|
||||
if ( !gfx_display_reset_textures_list(xmb_texture_path(XMB_TEXTURE_SUBSETTING), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
if ( !gfx_display_reset_textures_list(
|
||||
xmb_texture_path(XMB_TEXTURE_SUBSETTING),
|
||||
iconpath, &xmb->textures.list[i],
|
||||
TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL)
|
||||
&& !(menu_xmb_theme == XMB_ICON_THEME_CUSTOM))
|
||||
{
|
||||
/* Do not draw icons if subsetting is missing */
|
||||
|
@ -6469,15 +6497,19 @@ static void xmb_context_reset_internal(xmb_handle_t *xmb,
|
|||
|
||||
fill_pathname_application_special(
|
||||
fontpath, sizeof(fontpath), APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT);
|
||||
xmb->font = gfx_display_font_file(p_disp, fontpath, xmb->font_size, is_threaded);
|
||||
xmb->font2 = gfx_display_font_file(p_disp, fontpath, xmb->font2_size, is_threaded);
|
||||
xmb->font = gfx_display_font_file(p_disp,
|
||||
fontpath, xmb->font_size, is_threaded);
|
||||
xmb->font2 = gfx_display_font_file(p_disp,
|
||||
fontpath, xmb->font2_size, is_threaded);
|
||||
|
||||
xmb->wideglyph_width = 100;
|
||||
|
||||
if (wideglyph_str)
|
||||
{
|
||||
int char_width = font_driver_get_message_width(xmb->font, "a", 1, 1.0f);
|
||||
int wideglyph_width = font_driver_get_message_width(xmb->font, wideglyph_str, strlen(wideglyph_str), 1.0f);
|
||||
int char_width = font_driver_get_message_width(
|
||||
xmb->font, "a", 1, 1.0f);
|
||||
int wideglyph_width = font_driver_get_message_width(
|
||||
xmb->font, wideglyph_str, strlen(wideglyph_str), 1.0f);
|
||||
|
||||
if (wideglyph_width > 0 && char_width > 0)
|
||||
xmb->wideglyph_width = wideglyph_width * 100 / char_width;
|
||||
|
@ -6522,8 +6554,10 @@ static void xmb_context_reset_internal(xmb_handle_t *xmb,
|
|||
* > Thumbnails are enabled
|
||||
* > This is a playlist, a database list, a file list
|
||||
* or the quick menu */
|
||||
if ( gfx_thumbnail_is_enabled(menu_st->thumbnail_path_data, GFX_THUMBNAIL_RIGHT)
|
||||
|| gfx_thumbnail_is_enabled(menu_st->thumbnail_path_data, GFX_THUMBNAIL_LEFT))
|
||||
if ( gfx_thumbnail_is_enabled(
|
||||
menu_st->thumbnail_path_data, GFX_THUMBNAIL_RIGHT)
|
||||
|| gfx_thumbnail_is_enabled(
|
||||
menu_st->thumbnail_path_data, GFX_THUMBNAIL_LEFT))
|
||||
{
|
||||
if ( xmb->is_playlist
|
||||
|| xmb->is_db_manager_list
|
||||
|
@ -6778,8 +6812,9 @@ static void xmb_render(void *data,
|
|||
if (thumbnail_icon->icon.status == GFX_THUMBNAIL_STATUS_UNKNOWN)
|
||||
{
|
||||
node->icon_hide = false;
|
||||
if (!xmb_load_dynamic_icon(thumbnail_icon->thumbnail_path_data.icon_path,
|
||||
&thumbnail_icon->icon))
|
||||
if (!xmb_load_dynamic_icon(
|
||||
thumbnail_icon->thumbnail_path_data.icon_path,
|
||||
&thumbnail_icon->icon))
|
||||
{
|
||||
gfx_thumbnail_request_stream(
|
||||
&thumbnail_icon->thumbnail_path_data,
|
||||
|
@ -7033,9 +7068,6 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
/* Check whether fullscreen thumbnails are visible */
|
||||
if (xmb->fullscreen_thumbnail_alpha > 0.0f || xmb->want_fullscreen_thumbnails)
|
||||
{
|
||||
gfx_thumbnail_shadow_t thumbnail_shadow;
|
||||
gfx_thumbnail_t *right_thumbnail = NULL;
|
||||
gfx_thumbnail_t *left_thumbnail = NULL;
|
||||
int header_height;
|
||||
int header_margin;
|
||||
int thumbnail_box_width;
|
||||
|
@ -7043,6 +7075,9 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
int right_thumbnail_x;
|
||||
int left_thumbnail_x;
|
||||
int thumbnail_y;
|
||||
gfx_thumbnail_shadow_t thumbnail_shadow;
|
||||
gfx_thumbnail_t *right_thumbnail = NULL;
|
||||
gfx_thumbnail_t *left_thumbnail = NULL;
|
||||
int view_width = (int)video_width;
|
||||
int view_height = (int)video_height;
|
||||
int thumbnail_margin = (int)(xmb->icon_size / 2.0f);
|
||||
|
@ -7179,8 +7214,7 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
if ( show_right_thumbnail
|
||||
&& right_thumbnail->status == GFX_THUMBNAIL_STATUS_AVAILABLE)
|
||||
{
|
||||
gfx_thumbnail_get_draw_dimensions(
|
||||
right_thumbnail,
|
||||
gfx_thumbnail_get_draw_dimensions(right_thumbnail,
|
||||
thumbnail_box_width, thumbnail_box_height, 1.0f,
|
||||
&right_thumbnail_draw_width, &right_thumbnail_draw_height);
|
||||
|
||||
|
@ -7370,11 +7404,13 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
right_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)right_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y - frame_width +
|
||||
((thumbnail_box_height - (int)right_thumbnail_draw_height) >> 1),
|
||||
(unsigned)right_thumbnail_draw_width + (frame_width << 1),
|
||||
right_thumbnail_x
|
||||
- frame_width
|
||||
+ ((thumbnail_box_width - (int)right_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y
|
||||
- frame_width
|
||||
+ ((thumbnail_box_height - (int)right_thumbnail_draw_height) >> 1),
|
||||
(unsigned)right_thumbnail_draw_width + (frame_width << 1),
|
||||
(unsigned)right_thumbnail_draw_height + (frame_width << 1),
|
||||
(unsigned)view_width,
|
||||
(unsigned)view_height,
|
||||
|
@ -7406,10 +7442,12 @@ static void xmb_draw_fullscreen_thumbnails(
|
|||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
left_thumbnail_x - frame_width +
|
||||
((thumbnail_box_width - (int)left_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y - frame_width +
|
||||
((thumbnail_box_height - (int)left_thumbnail_draw_height) >> 1),
|
||||
left_thumbnail_x
|
||||
- frame_width
|
||||
+ ((thumbnail_box_width - (int)left_thumbnail_draw_width) >> 1),
|
||||
thumbnail_y
|
||||
- frame_width
|
||||
+ ((thumbnail_box_height - (int)left_thumbnail_draw_height) >> 1),
|
||||
(unsigned)left_thumbnail_draw_width + (frame_width << 1),
|
||||
(unsigned)left_thumbnail_draw_height + (frame_width << 1),
|
||||
(unsigned)view_width,
|
||||
|
@ -7520,24 +7558,27 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
(float)video_width - (xmb->icon_size / 6) -
|
||||
(xmb->margins_screen_left * xmb_scale_mod[5]) -
|
||||
xmb->icon_spacing_horizontal - pseudo_font_length;
|
||||
thumbnail_margin_height_under = ((float)video_height * under_thumb_margin) - xmb->margins_screen_top - xmb->icon_size;
|
||||
thumbnail_margin_height_full = (float)video_height - xmb->margins_title_top - ((xmb->icon_size / 4.0f) * 2.0f);
|
||||
thumbnail_margin_height_under = ((float)video_height * under_thumb_margin)
|
||||
- xmb->margins_screen_top - xmb->icon_size;
|
||||
thumbnail_margin_height_full = (float)video_height - xmb->margins_title_top
|
||||
- ((xmb->icon_size / 4.0f) * 2.0f);
|
||||
left_thumbnail_margin_x = xmb->icon_size / 6.0f;
|
||||
right_thumbnail_margin_x = (float)video_width - (xmb->icon_size / 6.0f) - right_thumbnail_margin_width;
|
||||
right_thumbnail_margin_x = (float)video_width - (xmb->icon_size / 6.0f)
|
||||
- right_thumbnail_margin_width;
|
||||
xmb->margins_title = (float)settings->ints.menu_xmb_title_margin * 10.0f;
|
||||
xmb->margins_title_horizontal_offset = (float)settings->ints.menu_xmb_title_margin_horizontal_offset * 10.0f;
|
||||
|
||||
/* Configure shadow effect */
|
||||
if (shadows_enable)
|
||||
{
|
||||
thumbnail_shadow.type = GFX_THUMBNAIL_SHADOW_OUTLINE;
|
||||
thumbnail_shadow.alpha = 0.2f;
|
||||
thumbnail_shadow.outline.width = 1 * xmb->last_scale_factor;
|
||||
thumbnail_shadow.type = GFX_THUMBNAIL_SHADOW_OUTLINE;
|
||||
thumbnail_shadow.alpha = 0.2f;
|
||||
thumbnail_shadow.outline.width = xmb->last_scale_factor;
|
||||
if (thumbnail_shadow.outline.width < 1)
|
||||
thumbnail_shadow.outline.width = 1;
|
||||
thumbnail_shadow.outline.width = 1;
|
||||
}
|
||||
else
|
||||
thumbnail_shadow.type = GFX_THUMBNAIL_SHADOW_NONE;
|
||||
thumbnail_shadow.type = GFX_THUMBNAIL_SHADOW_NONE;
|
||||
|
||||
font_driver_bind_block(xmb->font, &xmb->raster_block);
|
||||
font_driver_bind_block(xmb->font2, &xmb->raster_block2);
|
||||
|
@ -7575,7 +7616,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
}
|
||||
|
||||
/* Arrow image */
|
||||
gfx_display_set_alpha(xmb_item_color, MIN(xmb->textures_arrow_alpha, xmb->alpha));
|
||||
gfx_display_set_alpha(xmb_item_color,
|
||||
MIN(xmb->textures_arrow_alpha, xmb->alpha));
|
||||
|
||||
if (!xmb->assets_missing)
|
||||
{
|
||||
|
@ -7592,11 +7634,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
xmb->icon_size,
|
||||
xmb->icon_size,
|
||||
xmb->textures.list[XMB_TEXTURE_ARROW],
|
||||
xmb->x + xmb->margins_screen_left +
|
||||
xmb->icon_spacing_horizontal -
|
||||
xmb->icon_size / 2.0 + xmb->icon_size,
|
||||
xmb->margins_screen_top +
|
||||
xmb->icon_size / 2.0 + xmb->icon_spacing_vertical
|
||||
xmb->x + xmb->margins_screen_left
|
||||
+ xmb->icon_spacing_horizontal
|
||||
- xmb->icon_size / 2.0 + xmb->icon_size,
|
||||
xmb->margins_screen_top
|
||||
+ xmb->icon_size / 2.0 + xmb->icon_spacing_vertical
|
||||
* xmb->active_item_factor,
|
||||
video_width,
|
||||
video_height,
|
||||
|
@ -7720,11 +7762,14 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
if (show_right_thumbnail && show_left_thumbnail)
|
||||
{
|
||||
float thumb_width = right_thumbnail_margin_width;
|
||||
float thumb_height = (thumbnail_margin_height_full - (xmb->icon_size / 4.0f)) / 2.0f;
|
||||
float thumb_height = (thumbnail_margin_height_full
|
||||
- (xmb->icon_size / 4.0f)) / 2.0f;
|
||||
float scaled_thumb_width = thumb_width * thumbnail_scale_factor;
|
||||
float scaled_thumb_height = thumb_height * thumbnail_scale_factor;
|
||||
float thumb_x = right_thumbnail_margin_x + ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_y_base = xmb->margins_title_top + (xmb->icon_size / 4.0f);
|
||||
float thumb_x = right_thumbnail_margin_x
|
||||
+ ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_y_base = xmb->margins_title_top
|
||||
+ (xmb->icon_size / 4.0f);
|
||||
float thumb_y_offset = (thumb_height - scaled_thumb_height) / 2.0f;
|
||||
float right_thumb_y = thumb_y_base + thumb_y_offset;
|
||||
float left_thumb_y = thumb_y_base + thumb_height + (xmb->icon_size / 8) + thumb_y_offset;
|
||||
|
@ -7736,8 +7781,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
&xmb->thumbnails.right,
|
||||
thumb_x,
|
||||
right_thumb_y,
|
||||
scaled_thumb_width > 0.0f ? (unsigned)scaled_thumb_width : 0,
|
||||
scaled_thumb_height > 0.0f ? (unsigned)scaled_thumb_height : 0,
|
||||
(scaled_thumb_width > 0.0f) ? (unsigned)scaled_thumb_width : 0,
|
||||
(scaled_thumb_height > 0.0f) ? (unsigned)scaled_thumb_height : 0,
|
||||
GFX_THUMBNAIL_ALIGN_CENTRE,
|
||||
1.0f, 1.0f, &thumbnail_shadow);
|
||||
|
||||
|
@ -7748,8 +7793,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
&xmb->thumbnails.left,
|
||||
thumb_x,
|
||||
left_thumb_y,
|
||||
scaled_thumb_width > 0.0f ? (unsigned)scaled_thumb_width : 0,
|
||||
scaled_thumb_height > 0.0f ? (unsigned)scaled_thumb_height : 0,
|
||||
(scaled_thumb_width > 0.0f) ? (unsigned)scaled_thumb_width : 0,
|
||||
(scaled_thumb_height > 0.0f) ? (unsigned)scaled_thumb_height : 0,
|
||||
GFX_THUMBNAIL_ALIGN_CENTRE,
|
||||
1.0f, 1.0f, &thumbnail_shadow);
|
||||
|
||||
|
@ -7765,14 +7810,16 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
float thumb_height = thumbnail_margin_height_under;
|
||||
float scaled_thumb_width = thumb_width * thumbnail_scale_factor;
|
||||
float scaled_thumb_height = thumb_height * thumbnail_scale_factor;
|
||||
float thumb_x = right_thumbnail_margin_x + ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_x = right_thumbnail_margin_x
|
||||
+ ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_y = xmb->margins_screen_top + (xmb->icon_size / 1.5f);
|
||||
|
||||
gfx_thumbnail_draw(
|
||||
userdata,
|
||||
video_width,
|
||||
video_height,
|
||||
show_right_thumbnail ? &xmb->thumbnails.right : &xmb->thumbnails.left,
|
||||
show_right_thumbnail
|
||||
? &xmb->thumbnails.right : &xmb->thumbnails.left,
|
||||
thumb_x,
|
||||
thumb_y,
|
||||
scaled_thumb_width > 0.0f ? (unsigned)scaled_thumb_width : 0,
|
||||
|
@ -7790,7 +7837,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
float thumb_height = thumbnail_margin_height_under;
|
||||
float scaled_thumb_width = thumb_width * thumbnail_scale_factor;
|
||||
float scaled_thumb_height = thumb_height * thumbnail_scale_factor;
|
||||
float thumb_x = right_thumbnail_margin_x + ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_x = right_thumbnail_margin_x
|
||||
+ ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_y = xmb->margins_screen_top + (xmb->icon_size / 1.5f);
|
||||
|
||||
gfx_thumbnail_draw(
|
||||
|
@ -7800,8 +7848,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
&xmb->thumbnails.right,
|
||||
thumb_x,
|
||||
thumb_y,
|
||||
scaled_thumb_width > 0.0f ? (unsigned)scaled_thumb_width : 0,
|
||||
scaled_thumb_height > 0.0f ? (unsigned)scaled_thumb_height : 0,
|
||||
(scaled_thumb_width > 0.0f) ? (unsigned)scaled_thumb_width : 0,
|
||||
(scaled_thumb_height > 0.0f) ? (unsigned)scaled_thumb_height : 0,
|
||||
GFX_THUMBNAIL_ALIGN_TOP,
|
||||
1.0f, 1.0f, &thumbnail_shadow);
|
||||
}
|
||||
|
@ -7811,10 +7859,12 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
{
|
||||
float y_offset = xmb->icon_size * 1.75f;
|
||||
float thumb_width = left_thumbnail_margin_width;
|
||||
float thumb_height = thumbnail_margin_height_under - xmb->margins_title_bottom - y_offset;
|
||||
float thumb_height = thumbnail_margin_height_under
|
||||
- xmb->margins_title_bottom - y_offset;
|
||||
float scaled_thumb_width = thumb_width * thumbnail_scale_factor;
|
||||
float scaled_thumb_height = thumb_height * thumbnail_scale_factor;
|
||||
float thumb_x = left_thumbnail_margin_x + ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_x = left_thumbnail_margin_x
|
||||
+ ((thumb_width - scaled_thumb_width) / 2.0f);
|
||||
float thumb_y = xmb->margins_screen_top + xmb->icon_size + y_offset;
|
||||
|
||||
gfx_thumbnail_draw(
|
||||
|
@ -7839,11 +7889,13 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
else if (show_right_thumbnail || show_left_thumbnail)
|
||||
{
|
||||
float thumb_width = xmb->icon_size * 2.4f;
|
||||
float thumb_height = thumbnail_margin_height_under - xmb->margins_title_bottom;
|
||||
float thumb_height = thumbnail_margin_height_under
|
||||
- xmb->margins_title_bottom;
|
||||
float scaled_thumb_width = thumb_width * thumbnail_scale_factor;
|
||||
float scaled_thumb_height = thumb_height * thumbnail_scale_factor;
|
||||
float thumb_x = (thumb_width - scaled_thumb_width) / 2.0f;
|
||||
float thumb_y = video_height - thumbnail_margin_height_under - (xmb->icon_size * 0.55f);
|
||||
float thumb_y = video_height
|
||||
- thumbnail_margin_height_under - (xmb->icon_size * 0.55f);
|
||||
|
||||
/* Very small thumbnails look ridiculous
|
||||
* > Impose a minimum size limit */
|
||||
|
@ -7897,11 +7949,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
xmb->icon_size,
|
||||
xmb->icon_size,
|
||||
xmb->textures.list[
|
||||
powerstate.charging? XMB_TEXTURE_BATTERY_CHARGING :
|
||||
(powerstate.percent > 80)? XMB_TEXTURE_BATTERY_FULL :
|
||||
(powerstate.percent > 60)? XMB_TEXTURE_BATTERY_80 :
|
||||
(powerstate.percent > 40)? XMB_TEXTURE_BATTERY_60 :
|
||||
(powerstate.percent > 20)? XMB_TEXTURE_BATTERY_40 :
|
||||
powerstate.charging ? XMB_TEXTURE_BATTERY_CHARGING :
|
||||
(powerstate.percent > 80) ? XMB_TEXTURE_BATTERY_FULL :
|
||||
(powerstate.percent > 60) ? XMB_TEXTURE_BATTERY_80 :
|
||||
(powerstate.percent > 40) ? XMB_TEXTURE_BATTERY_60 :
|
||||
(powerstate.percent > 20) ? XMB_TEXTURE_BATTERY_40 :
|
||||
XMB_TEXTURE_BATTERY_20
|
||||
],
|
||||
video_width - xmb->margins_title_left + margin_offset,
|
||||
|
@ -8132,11 +8184,14 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
gfx_animation_ctx_ticker_t ticker;
|
||||
gfx_animation_ctx_ticker_smooth_t ticker_smooth;
|
||||
char tmp[NAME_MAX_LENGTH];
|
||||
size_t tmp_len = (video_width - xmb->margins_title_left - xmb->icon_size - title_header_max_width);
|
||||
unsigned ticker_x_offset = 0;
|
||||
bool use_smooth_ticker = settings->bools.menu_ticker_smooth;
|
||||
size_t tmp_len = (video_width
|
||||
- xmb->margins_title_left
|
||||
- xmb->icon_size
|
||||
- title_header_max_width);
|
||||
unsigned ticker_x_offset = 0;
|
||||
bool use_smooth_ticker = settings->bools.menu_ticker_smooth;
|
||||
enum gfx_animation_ticker_type menu_ticker_type
|
||||
= (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
|
||||
= (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
|
||||
|
||||
tmp[0] = '\0';
|
||||
|
||||
|
@ -8171,7 +8226,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
else
|
||||
{
|
||||
ticker.s = tmp;
|
||||
ticker.len = (tmp_len * xmb->last_scale_factor) / (xmb->font_size * 0.5f * xmb->last_scale_factor);
|
||||
ticker.len = (tmp_len * xmb->last_scale_factor)
|
||||
/ (xmb->font_size * 0.5f * xmb->last_scale_factor);
|
||||
ticker.str = title_truncated;
|
||||
|
||||
if (ticker.str)
|
||||
|
@ -8196,9 +8252,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
}
|
||||
|
||||
if (xmb->font && xmb->font->renderer && xmb->font->renderer->flush)
|
||||
xmb->font->renderer->flush(video_width, video_height, xmb->font->renderer_data);
|
||||
xmb->font->renderer->flush(video_width,
|
||||
video_height, xmb->font->renderer_data);
|
||||
if (xmb->font2 && xmb->font2->renderer && xmb->font2->renderer->flush)
|
||||
xmb->font2->renderer->flush(video_width, video_height, xmb->font2->renderer_data);
|
||||
xmb->font2->renderer->flush(video_width,
|
||||
video_height, xmb->font2->renderer_data);
|
||||
font_driver_bind_block(xmb->font, NULL);
|
||||
font_driver_bind_block(xmb->font2, NULL);
|
||||
|
||||
|
@ -8250,7 +8308,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
|||
/* Cursor image */
|
||||
if (xmb->show_mouse)
|
||||
{
|
||||
bool cursor_visible = menu_mouse_enable && (video_fullscreen || mouse_grabbed);
|
||||
bool cursor_visible = menu_mouse_enable
|
||||
&& (video_fullscreen || mouse_grabbed);
|
||||
|
||||
gfx_display_set_alpha(xmb_coord_white, MIN(xmb->alpha, 1.00f));
|
||||
if (cursor_visible)
|
||||
|
@ -8397,7 +8456,8 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
|||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_ADD;
|
||||
#endif /* 0 */
|
||||
#if defined(HAVE_DYNAMIC)
|
||||
if (settings->uints.menu_content_show_contentless_cores != MENU_CONTENTLESS_CORES_DISPLAY_NONE)
|
||||
if ( settings->uints.menu_content_show_contentless_cores
|
||||
!= MENU_CONTENTLESS_CORES_DISPLAY_NONE)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_CONTENTLESS_CORES;
|
||||
#endif
|
||||
|
||||
|
@ -8632,10 +8692,8 @@ static void xmb_list_free(file_list_t *list, size_t a, size_t b)
|
|||
xmb_list_clear(list);
|
||||
}
|
||||
|
||||
static void xmb_list_deep_copy(
|
||||
const file_list_t *src,
|
||||
file_list_t *dst,
|
||||
size_t first, size_t last)
|
||||
static void xmb_list_deep_copy(const file_list_t *src,
|
||||
file_list_t *dst, size_t first, size_t last)
|
||||
{
|
||||
size_t i, j = 0;
|
||||
uintptr_t tag = (uintptr_t)dst;
|
||||
|
@ -8661,7 +8719,8 @@ static void xmb_list_deep_copy(
|
|||
d->label = string_is_empty(d->label) ? NULL : strdup(d->label);
|
||||
|
||||
if (src_udata)
|
||||
dst->list[j].userdata = (void*)xmb_copy_node((const xmb_node_t*)src_udata);
|
||||
dst->list[j].userdata = (void*)
|
||||
xmb_copy_node((const xmb_node_t*)src_udata);
|
||||
|
||||
if (src_adata)
|
||||
{
|
||||
|
@ -8676,7 +8735,8 @@ static void xmb_list_deep_copy(
|
|||
dst->size = j;
|
||||
}
|
||||
|
||||
static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action)
|
||||
static void xmb_list_cache(void *data, enum menu_list_type type,
|
||||
unsigned action)
|
||||
{
|
||||
size_t stack_size, list_size;
|
||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||
|
@ -8848,10 +8908,8 @@ static void xmb_context_destroy(void *data)
|
|||
|
||||
static void xmb_fade_out(xmb_handle_t *xmb)
|
||||
{
|
||||
if (!xmb)
|
||||
return;
|
||||
|
||||
xmb->alpha = 0;
|
||||
if (xmb)
|
||||
xmb->alpha = 0;
|
||||
}
|
||||
|
||||
static void xmb_fade_in(xmb_handle_t *xmb)
|
||||
|
@ -9385,7 +9443,8 @@ static int xmb_pointer_up(void *userdata,
|
|||
unsigned last = end;
|
||||
|
||||
if (height)
|
||||
xmb_calculate_visible_range(xmb, height, end, (unsigned)selection, &first, &last);
|
||||
xmb_calculate_visible_range(xmb, height, end,
|
||||
(unsigned)selection, &first, &last);
|
||||
|
||||
if (last < end)
|
||||
{
|
||||
|
@ -9394,9 +9453,9 @@ static int xmb_pointer_up(void *userdata,
|
|||
}
|
||||
else
|
||||
{
|
||||
size_t menu_list_size = menu_st->entries.list ? MENU_LIST_GET_SELECTION(menu_st->entries.list, 0)->size : 0;
|
||||
size_t menu_list_size = menu_st->entries.list
|
||||
? MENU_LIST_GET_SELECTION(menu_st->entries.list, 0)->size : 0;
|
||||
size_t new_selection = menu_list_size - 1;
|
||||
|
||||
menu_st->selection_ptr = new_selection;
|
||||
|
||||
if (menu_st->driver_ctx->navigation_set_last)
|
||||
|
@ -9476,7 +9535,9 @@ menu_ctx_driver_t menu_ctx_xmb = {
|
|||
xmb_populate_entries,
|
||||
xmb_toggle,
|
||||
xmb_navigation_clear,
|
||||
NULL, /*xmb_navigation_pointer_changed,*/ /* Note: navigation_set() is called each time navigation_increment/decrement() */
|
||||
NULL, /*xmb_navigation_pointer_changed,*/ /* Note:
|
||||
navigation_set() is called each time
|
||||
navigation_increment/decrement() */
|
||||
NULL, /*xmb_navigation_pointer_changed,*/ /* is called, so linking these just duplicates work... */
|
||||
xmb_navigation_set,
|
||||
xmb_navigation_pointer_changed,
|
||||
|
|
Loading…
Reference in New Issue