mirror of
https://github.com/libretro/RetroArch
synced 2025-02-23 06:41:04 +00:00
Savestate thumbnail aspect ratio fallback (#14828)
This commit is contained in:
parent
1ab6028b00
commit
55aeba2f57
@ -803,8 +803,9 @@ void gfx_thumbnail_get_draw_dimensions(
|
||||
display_aspect = (float)width / (float)height;
|
||||
thumbnail_aspect = (float)thumbnail->width / (float)thumbnail->height;
|
||||
core_aspect = ((thumbnail->flags & GFX_THUMB_FLAG_CORE_ASPECT)
|
||||
&& video_st)
|
||||
? video_st->av_info.geometry.aspect_ratio : thumbnail_aspect;
|
||||
&& video_st && video_st->av_info.geometry.aspect_ratio > 0)
|
||||
? video_st->av_info.geometry.aspect_ratio
|
||||
: thumbnail_aspect;
|
||||
|
||||
if (thumbnail_aspect > display_aspect)
|
||||
{
|
||||
|
@ -2364,8 +2364,10 @@ static bool rgui_downscale_thumbnail(
|
||||
/* Determine output dimensions */
|
||||
float display_aspect_ratio = (float)max_width / (float)max_height;
|
||||
float aspect_ratio = (float)image_src->width / (float)image_src->height;
|
||||
float core_aspect = (thumbnail_core_aspect && video_st)
|
||||
? video_st->av_info.geometry.aspect_ratio : aspect_ratio;
|
||||
float core_aspect = (thumbnail_core_aspect
|
||||
&& video_st && video_st->av_info.geometry.aspect_ratio > 0)
|
||||
? video_st->av_info.geometry.aspect_ratio
|
||||
: aspect_ratio;
|
||||
|
||||
if (aspect_ratio > display_aspect_ratio)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user