(VC Context driver) Style nits/cleanups

This commit is contained in:
twinaphex 2015-04-09 05:35:01 +02:00
parent ff398fe6c8
commit 644d52b6ab

View File

@ -136,25 +136,26 @@ static void gfx_ctx_vc_get_video_size(void *data,
settings_t *settings = config_get_ptr();
(void)data;
// Use dispmanx upscaling if fullscreen_x and fullscreen_y are set.
/* Use dispmanx upscaling if
* fullscreen_x and fullscreen_y are set. */
if (settings->video.fullscreen_x != 0 &&
settings->video.fullscreen_y != 0)
{
// Keep input and output aspect ratio equal.
// There are other aspect ratio settings which can be used to stretch video output.
// --------------------------------------------------------------------------------
// Calculate source and destination aspect ratios.
/* Keep input and output aspect ratio equal.
* There are other aspect ratio settings
* which can be used to stretch video output. */
/* Calculate source and destination aspect ratios. */
float srcAspect = (float)settings->video.fullscreen_x / (float)settings->video.fullscreen_y;
float dstAspect = (float)g_fb_width / (float)g_fb_height;
// If source and destination aspect ratios are not equal correct source width.
/* If source and destination aspect ratios are not equal correct source width. */
if (srcAspect != dstAspect)
{
*width = (unsigned)(settings->video.fullscreen_y * dstAspect);
}
else
{
*width = settings->video.fullscreen_x;
}
*height = settings->video.fullscreen_y;
}
else
@ -246,17 +247,18 @@ static bool gfx_ctx_vc_init(void *data)
src_rect.x = 0;
src_rect.y = 0;
// Use dispmanx upscaling if fullscreen_x and fullscreen_y are set.
/* Use dispmanx upscaling if fullscreen_x
* and fullscreen_y are set. */
if (settings->video.fullscreen_x != 0 &&
settings->video.fullscreen_y != 0)
{
// Keep input and output aspect ratio equal.
// There are other aspect ratio settings which can be used to stretch video output.
// --------------------------------------------------------------------------------
// Calculate source and destination aspect ratios.
/* Keep input and output aspect ratio equal.
* There are other aspect ratio settings which can be used to stretch video output. */
/* Calculate source and destination aspect ratios. */
float srcAspect = (float)settings->video.fullscreen_x / (float)settings->video.fullscreen_y;
float dstAspect = (float)g_fb_width / (float)g_fb_height;
// If source and destination aspect ratios are not equal correct source width.
/* If source and destination aspect ratios are not equal correct source width. */
if (srcAspect != dstAspect)
src_rect.width = (unsigned)(settings->video.fullscreen_y * dstAspect) << 16;
else
@ -283,17 +285,21 @@ static bool gfx_ctx_vc_init(void *data)
&src_rect, DISPMANX_PROTECTION_NONE, &alpha, 0 /*clamp*/, DISPMANX_NO_ROTATE);
nativewindow.element = dispman_element;
// Use dispmanx upscaling if fullscreen_x and fullscreen_y are set.
/* Use dispmanx upscaling if fullscreen_x and fullscreen_y are set. */
if (settings->video.fullscreen_x != 0 &&
settings->video.fullscreen_y != 0)
{
// Keep input and output aspect ratio equal.
// There are other aspect ratio settings which can be used to stretch video output.
// --------------------------------------------------------------------------------
// Calculate source and destination aspect ratios.
/* Keep input and output aspect ratio equal.
* There are other aspect ratio settings which
* can be used to stretch video output. */
/* Calculate source and destination aspect ratios. */
float srcAspect = (float)settings->video.fullscreen_x / (float)settings->video.fullscreen_y;
float dstAspect = (float)g_fb_width / (float)g_fb_height;
// If source and destination aspect ratios are not equal correct source width.
/* If source and destination aspect ratios are not equal correct source width. */
if (srcAspect != dstAspect)
nativewindow.width = (unsigned)(settings->video.fullscreen_y * dstAspect);
else