diff --git a/gfx/video_crt_switch.c b/gfx/video_crt_switch.c index 35586ab9dd..1e1b67dec5 100644 --- a/gfx/video_crt_switch.c +++ b/gfx/video_crt_switch.c @@ -119,7 +119,7 @@ static void crt_screen_setup_aspect(unsigned width, unsigned height) if (height == 4) { /* detect menu only */ - if (width < 1920) + if (width < 700) width = 320; height = 240; @@ -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) + break; } - return 0; + return dynamic_width; } #if defined(HAVE_VIDEOCORE) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 939ff2eefa..63ca9fc1f1 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -1195,12 +1195,13 @@ static void setting_get_string_representation_crt_switch_resolution_super( return; if (*setting->value.target.unsigned_integer == 0) - strlcpy(s, msg_hash_to_str(MSG_NATIVE), len); + strlcpy(s, "NATIVE", len); else snprintf(s, len, "%d", *setting->value.target.unsigned_integer); /* TO DO make 1 read as DYNAMIC */ + if (*setting->value.target.unsigned_integer == 1) - strlcpy(s, msg_hash_to_str(MSG_DYNAMIC), len); + strlcpy(s, "DYNAMIC", len); else snprintf(s, len, "%d", *setting->value.target.unsigned_integer); } @@ -1577,6 +1578,7 @@ static int setting_uint_action_right_crt_switch_resolution_super( break; case 1: /* for dynamic super resolution switching - best fit */ *setting->value.target.unsigned_integer = 1920; + break; case 1920: *setting->value.target.unsigned_integer = 2560; break;