mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 12:39:54 +00:00
(Ozone) Thumbnail related fixes (#15810)
This commit is contained in:
parent
b71d09a31f
commit
e3becab18e
@ -373,9 +373,7 @@ typedef struct ozone_theme
|
|||||||
float *sidebar_top_gradient;
|
float *sidebar_top_gradient;
|
||||||
float *sidebar_bottom_gradient;
|
float *sidebar_bottom_gradient;
|
||||||
|
|
||||||
/*
|
/* Fancy cursor colors */
|
||||||
Fancy cursor colors
|
|
||||||
*/
|
|
||||||
float *cursor_border_0;
|
float *cursor_border_0;
|
||||||
float *cursor_border_1;
|
float *cursor_border_1;
|
||||||
|
|
||||||
@ -3366,8 +3364,8 @@ static void ozone_draw_sidebar(
|
|||||||
for (i = 0; i < (unsigned)(ozone->system_tab_end + 1); i++)
|
for (i = 0; i < (unsigned)(ozone->system_tab_end + 1); i++)
|
||||||
{
|
{
|
||||||
float *col = NULL;
|
float *col = NULL;
|
||||||
bool selected = (ozone->categories_selection_ptr == i);
|
bool selected = (ozone->categories_selection_ptr == i);
|
||||||
unsigned icon = ozone_system_tabs_icons[ozone->tabs[i]];
|
unsigned icon = ozone_system_tabs_icons[ozone->tabs[i]];
|
||||||
|
|
||||||
if (!(col = selected ? ozone->theme->text_selected : ozone->theme->entries_icon))
|
if (!(col = selected ? ozone->theme->text_selected : ozone->theme->entries_icon))
|
||||||
col = ozone->pure_white;
|
col = ozone->pure_white;
|
||||||
@ -3768,8 +3766,6 @@ static void ozone_entries_update_thumbnail_bar(
|
|||||||
{
|
{
|
||||||
if (allow_animation)
|
if (allow_animation)
|
||||||
{
|
{
|
||||||
ozone->show_thumbnail_bar = true;
|
|
||||||
|
|
||||||
entry.cb = NULL;
|
entry.cb = NULL;
|
||||||
entry.userdata = NULL;
|
entry.userdata = NULL;
|
||||||
entry.target_value = ozone->dimensions.thumbnail_bar_width;
|
entry.target_value = ozone->dimensions.thumbnail_bar_width;
|
||||||
@ -3780,9 +3776,9 @@ static void ozone_entries_update_thumbnail_bar(
|
|||||||
{
|
{
|
||||||
ozone->animations.thumbnail_bar_position
|
ozone->animations.thumbnail_bar_position
|
||||||
= ozone->dimensions.thumbnail_bar_width;
|
= ozone->dimensions.thumbnail_bar_width;
|
||||||
ozone->show_thumbnail_bar = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ozone->show_thumbnail_bar = true;
|
||||||
ozone->flags &= ~OZONE_FLAG_PENDING_HIDE_THUMBNAIL_BAR;
|
ozone->flags &= ~OZONE_FLAG_PENDING_HIDE_THUMBNAIL_BAR;
|
||||||
|
|
||||||
/* Want thumbnails to load instantly when thumbnail
|
/* Want thumbnails to load instantly when thumbnail
|
||||||
@ -7164,20 +7160,6 @@ static void ozone_draw_fullscreen_thumbnails(
|
|||||||
&& (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS))
|
&& (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* Safety check: ensure that current
|
|
||||||
* selection matches the entry selected when
|
|
||||||
* fullscreen thumbnails were enabled
|
|
||||||
* > Note that we exclude this check if we are
|
|
||||||
* currently viewing the quick menu and the
|
|
||||||
* thumbnail view is fading out. This enables
|
|
||||||
* a smooth transition if the user presses
|
|
||||||
* RetroPad A or keyboard 'return' to enter the
|
|
||||||
* quick menu while fullscreen thumbnails are
|
|
||||||
* being displayed */
|
|
||||||
if (((size_t)ozone->selection != ozone->fullscreen_thumbnail_selection) &&
|
|
||||||
((!(ozone->is_quick_menu)) || (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS)))
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* Sanity check: Return immediately if the view
|
/* Sanity check: Return immediately if the view
|
||||||
* width/height is < 1 */
|
* width/height is < 1 */
|
||||||
if ((view_width < 1) || (view_height < 1))
|
if ((view_width < 1) || (view_height < 1))
|
||||||
@ -7202,11 +7184,10 @@ static void ozone_draw_fullscreen_thumbnails(
|
|||||||
num_thumbnails++;
|
num_thumbnails++;
|
||||||
|
|
||||||
/* Prevent screen flashing when browsing in fullscreen thumbnail mode */
|
/* Prevent screen flashing when browsing in fullscreen thumbnail mode */
|
||||||
if ( (ozone->flags & OZONE_FLAG_IS_PLAYLIST)
|
if ( (num_thumbnails < 1)
|
||||||
&& (num_thumbnails < 1)
|
|
||||||
&& (ozone->flags2 & OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS)
|
&& (ozone->flags2 & OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS)
|
||||||
&& ( (right_thumbnail->status != GFX_THUMBNAIL_STATUS_MISSING)
|
&& ( (right_thumbnail->status != GFX_THUMBNAIL_STATUS_MISSING)
|
||||||
&& (left_thumbnail->status != GFX_THUMBNAIL_STATUS_MISSING)))
|
&& (left_thumbnail->status != GFX_THUMBNAIL_STATUS_MISSING)))
|
||||||
{
|
{
|
||||||
/* Darken background */
|
/* Darken background */
|
||||||
gfx_display_draw_quad(
|
gfx_display_draw_quad(
|
||||||
@ -7505,7 +7486,8 @@ static void ozone_set_thumbnail_content(void *data, const char *s)
|
|||||||
case OZONE_SYSTEM_TAB_VIDEO:
|
case OZONE_SYSTEM_TAB_VIDEO:
|
||||||
#endif
|
#endif
|
||||||
case OZONE_SYSTEM_TAB_MUSIC:
|
case OZONE_SYSTEM_TAB_MUSIC:
|
||||||
ozone->flags &= ~OZONE_FLAG_WANT_THUMBNAIL_BAR;
|
if (ozone->categories_selection_ptr <= ozone->system_tab_end)
|
||||||
|
ozone->flags &= ~OZONE_FLAG_WANT_THUMBNAIL_BAR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -8327,6 +8309,7 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||||||
{
|
{
|
||||||
ozone->pending_cursor_in_sidebar = false;
|
ozone->pending_cursor_in_sidebar = false;
|
||||||
ozone->flags |= OZONE_FLAG_CURSOR_IN_SIDEBAR;
|
ozone->flags |= OZONE_FLAG_CURSOR_IN_SIDEBAR;
|
||||||
|
ozone_sidebar_goto(ozone, ozone->categories_selection_ptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -9766,10 +9749,10 @@ static void ozone_render(void *data,
|
|||||||
width, height, false, false);
|
width, height, false, false);
|
||||||
thumbnail_scale_factor = settings->floats.ozone_thumbnail_scale_factor;
|
thumbnail_scale_factor = settings->floats.ozone_thumbnail_scale_factor;
|
||||||
|
|
||||||
if ((scale_factor != ozone->last_scale_factor) ||
|
if ( (scale_factor != ozone->last_scale_factor)
|
||||||
(thumbnail_scale_factor != ozone->last_thumbnail_scale_factor) ||
|
|| (thumbnail_scale_factor != ozone->last_thumbnail_scale_factor)
|
||||||
(width != ozone->last_width) ||
|
|| (width != ozone->last_width)
|
||||||
(height != ozone->last_height))
|
|| (height != ozone->last_height))
|
||||||
{
|
{
|
||||||
ozone->last_scale_factor = scale_factor;
|
ozone->last_scale_factor = scale_factor;
|
||||||
ozone->last_thumbnail_scale_factor = thumbnail_scale_factor;
|
ozone->last_thumbnail_scale_factor = thumbnail_scale_factor;
|
||||||
@ -11244,7 +11227,8 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation)
|
|||||||
gfx_thumbnail_set_content(menu_st->thumbnail_path_data, NULL);
|
gfx_thumbnail_set_content(menu_st->thumbnail_path_data, NULL);
|
||||||
ozone_unload_thumbnail_textures(ozone);
|
ozone_unload_thumbnail_textures(ozone);
|
||||||
update_thumbnails = true;
|
update_thumbnails = true;
|
||||||
ozone->flags &= ~OZONE_FLAG_WANT_THUMBNAIL_BAR;
|
ozone->flags &= ~(OZONE_FLAG_WANT_THUMBNAIL_BAR
|
||||||
|
| OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11355,15 +11339,10 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) || (ozone->flags & OZONE_FLAG_IS_STATE_SLOT))
|
if ( ( (size_t)ozone->selection != ozone->fullscreen_thumbnail_selection
|
||||||
&& (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS)
|
&& (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS))
|
||||||
&& (size_t)ozone->selection != ozone->fullscreen_thumbnail_selection)
|
|| ( (ozone->flags2 & OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS)
|
||||||
{
|
&& !(ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS)))
|
||||||
ozone->flags |= OZONE_FLAG_NEED_COMPUTE;
|
|
||||||
ozone_show_fullscreen_thumbnails(ozone);
|
|
||||||
}
|
|
||||||
else if ( (!(ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS))
|
|
||||||
&& (ozone->flags2 & OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS))
|
|
||||||
{
|
{
|
||||||
ozone->flags |= OZONE_FLAG_NEED_COMPUTE;
|
ozone->flags |= OZONE_FLAG_NEED_COMPUTE;
|
||||||
ozone_show_fullscreen_thumbnails(ozone);
|
ozone_show_fullscreen_thumbnails(ozone);
|
||||||
@ -12063,8 +12042,9 @@ static void ozone_populate_entries(
|
|||||||
case OZONE_SYSTEM_TAB_VIDEO:
|
case OZONE_SYSTEM_TAB_VIDEO:
|
||||||
#endif
|
#endif
|
||||||
case OZONE_SYSTEM_TAB_MUSIC:
|
case OZONE_SYSTEM_TAB_MUSIC:
|
||||||
ozone->flags &= ~(OZONE_FLAG_WANT_THUMBNAIL_BAR
|
if (ozone->categories_selection_ptr <= ozone->system_tab_end)
|
||||||
| OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE);
|
ozone->flags &= ~(OZONE_FLAG_WANT_THUMBNAIL_BAR
|
||||||
|
| OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user