Fix a crash when switchres is used with videocore drivers. (#16822)

This commit is contained in:
zoltanvb 2024-07-31 02:33:25 +02:00 committed by GitHub
parent 394c396d89
commit 75c8c3c568
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);