From 75c8c3c568a78d87f43c25fd28927ce013d26dfa Mon Sep 17 00:00:00 2001 From: zoltanvb <101990835+zoltanvb@users.noreply.github.com> Date: Wed, 31 Jul 2024 02:33:25 +0200 Subject: [PATCH] Fix a crash when switchres is used with videocore drivers. (#16822) --- gfx/video_crt_switch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index ca8b8ca392c..e51fa81d328 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -133,12 +133,14 @@ static void crt_switch_set_aspect( patched_height = height; } +#if !defined(HAVE_VIDEOCORE) sr_get_state(&state); if ((int)srm_width >= state.super_width && !srm_isstretched) RARCH_LOG("[CRT]: Super resolution detected. Fractal scaling @ X:%f Y:%f \n", srm_xscale, srm_yscale); else if (srm_isstretched && srm_width > 0 ) RARCH_LOG("[CRT]: Resolution is stretched. Fractal scaling @ X:%f Y:%f \n", srm_xscale, srm_yscale); +#endif scaled_width = roundf(patched_width * srm_xscale); scaled_height = roundf(patched_height * srm_yscale);