Skip to content

Commit

Permalink
RGUI: Thumbnail fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sonninnos committed Feb 10, 2025
1 parent 5d3ff55 commit adf9aec
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions menu/drivers/rgui.c
Original file line number Diff line number Diff line change
Expand Up @@ -5001,7 +5001,6 @@ static void rgui_render(void *data, unsigned width, unsigned height,
bool menu_mouse_enable = settings->bools.menu_mouse_enable;
bool menu_core_enable = settings->bools.menu_core_enable;
bool menu_timedate_enable = settings->bools.menu_timedate_enable;
bool menu_rgui_swap_thumbnails = settings->bools.menu_rgui_swap_thumbnails;
float menu_rgui_particle_effect_speed
= settings->floats.menu_rgui_particle_effect_speed;
bool menu_rgui_particle_effect_screensaver
Expand Down Expand Up @@ -5322,6 +5321,15 @@ static void rgui_render(void *data, unsigned width, unsigned height,
show_left_thumbnail = (rgui->flags & RGUI_FLAG_ENTRY_HAS_LEFT_THUMBNAIL)
&& (rgui->mini_left_thumbnail.is_valid || (rgui->left_thumbnail_queue_size > 0));

/* Images playlist needs to show only the bottom thumbnail */
if (string_is_equal(rgui->menu_title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_IMAGES_TAB)))
{
if (rgui_swap_thumbnails)
show_left_thumbnail = false;
else
show_thumbnail = false;
}

/* Get maximum width of thumbnail 'panel' on right side
* of screen */
thumbnail_panel_width = rgui_get_mini_thumbnail_fullwidth(rgui);
Expand Down Expand Up @@ -5700,9 +5708,9 @@ static void rgui_render(void *data, unsigned width, unsigned height,
if (show_savestate_thumbnail && thumbnail_savestate)
rgui_render_mini_thumbnail(rgui, thumbnail_savestate,
rgui->frame_buf.data,
GFX_THUMBNAIL_LEFT,
(rgui_swap_thumbnails) ? GFX_THUMBNAIL_RIGHT : GFX_THUMBNAIL_LEFT,
fb_width, fb_height, fb_pitch,
menu_rgui_swap_thumbnails);
rgui_swap_thumbnails);
}
else if (show_mini_thumbnails)
{
Expand All @@ -5713,13 +5721,13 @@ static void rgui_render(void *data, unsigned width, unsigned height,
rgui->frame_buf.data,
GFX_THUMBNAIL_RIGHT,
fb_width, fb_height, fb_pitch,
menu_rgui_swap_thumbnails);
rgui_swap_thumbnails);
if (show_left_thumbnail && thumbnail2)
rgui_render_mini_thumbnail(rgui, thumbnail2,
rgui->frame_buf.data,
GFX_THUMBNAIL_LEFT,
fb_width, fb_height, fb_pitch,
menu_rgui_swap_thumbnails);
rgui_swap_thumbnails);
}

/* Print menu sublabel/core name (if required) */
Expand Down

0 comments on commit adf9aec

Please sign in to comment.