Merge pull request #8264 from alphanu1/master

Fixed missing break (#118)
This commit is contained in:
Twinaphex 2019-02-12 17:20:51 +01:00 committed by GitHub
commit d7bb9807b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 10 deletions

View File

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

View File

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