Skip to content

Commit

Permalink
Fix a crash when switchres is used with videocore drivers. (#16822)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanvb authored Jul 31, 2024
1 parent 394c396 commit 75c8c3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gfx/video_crt_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 75c8c3c

Please sign in to comment.