From 7cb1543eddedcfb91246df1899d61d45a4eaace2 Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Sun, 29 Sep 2024 07:53:14 +0300 Subject: [PATCH] Use frame cache size in integer scaling instead of av info geometry (#17057) --- gfx/video_driver.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 4f0fc54228..bfbdf541e7 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2354,12 +2354,8 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp, int padding_y = 0; float viewport_bias_x = settings->floats.video_viewport_bias_x; float viewport_bias_y = settings->floats.video_viewport_bias_y; - /* Use system reported sizes as these define the - * geometry for the "normal" case. */ - unsigned content_width = - video_st->av_info.geometry.base_width; - unsigned content_height = - video_st->av_info.geometry.base_height; + unsigned content_width = video_st->frame_cache_width; + unsigned content_height = video_st->frame_cache_height; unsigned int rotation = retroarch_get_rotation(); #if defined(RARCH_MOBILE) if (width < height) @@ -2373,7 +2369,7 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp, viewport_bias_y = 1.0 - viewport_bias_y; if (rotation % 2) - content_height = video_st->av_info.geometry.base_width; + content_height = content_width; if (content_height == 0) content_height = 1;