diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index 35586ab9dd..494315653c 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -231,20 +231,20 @@ void crt_video_restore(void) int crt_compute_dynamic_width(int width) { - double p_clock = 18000000; - int min_height = 261; + double p_clock = 18000000; + int min_height = 261; + int dynamic_width = 0; #if defined(HAVE_VIDEOCORE) double p_clock = 32000000; #endif for (int i =1; i < 10; i++) { - if (((width*0.5*i) * min_height * ra_core_hz) > p_clock) - width = width*i; - return width; - break; + dynamic_width = (width*0.5)*i; + if ((dynamic_width * min_height * ra_core_hz) > p_clock) + return dynamic_width; } - return 0; + return width; } #if defined(HAVE_VIDEOCORE)