Dynamic width - function completed (#119)

This commit is contained in:
alphanu1 2019-02-12 14:38:01 +00:00 committed by GitHub
parent 32525d6bd3
commit b37c64742f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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