C89_BUILD fix

This commit is contained in:
Brad Parker 2016-10-04 12:15:46 -04:00
parent 97856ea391
commit 1f27773fe0

View File

@ -97,6 +97,7 @@ static void *vg_init(const video_info_t *video,
gfx_ctx_aspect_t aspect_data;
unsigned interval;
unsigned temp_width = 0, temp_height = 0;
unsigned win_width, win_height;
VGfloat clearColor[4] = {0, 0, 0, 1};
settings_t *settings = config_get_ptr();
vg_t *vg = (vg_t*)calloc(1, sizeof(vg_t));
@ -129,8 +130,9 @@ static void *vg_init(const video_info_t *video,
vg->mTexType = video->rgb32 ? VG_sXRGB_8888 : VG_sRGB_565;
vg->keep_aspect = video->force_aspect;
unsigned win_width = video->width;
unsigned win_height = video->height;
win_width = video->width;
win_height = video->height;
if (video->fullscreen && (win_width == 0) && (win_height == 0))
{
video_driver_get_size(&temp_width, &temp_height);
@ -198,20 +200,23 @@ static void *vg_init(const video_info_t *video,
if (vg->mFont != VG_INVALID_HANDLE)
{
VGfloat paintFg[4];
VGfloat paintBg[4];
vg->mFontsOn = true;
vg->mFontHeight = settings->video.font_size;
vg->mPaintFg = vgCreatePaint();
vg->mPaintBg = vgCreatePaint();
VGfloat paintFg[] = {
settings->video.msg_color_r,
settings->video.msg_color_g,
settings->video.msg_color_b,
1.0f };
VGfloat paintBg[] = {
settings->video.msg_color_r / 2.0f,
settings->video.msg_color_g / 2.0f,
settings->video.msg_color_b / 2.0f,
0.5f };
paintFg[0] = settings->video.msg_color_r;
paintFg[1] = settings->video.msg_color_g;
paintFg[2] = settings->video.msg_color_b;
paintFg[3] = 1.0f;
paintBg[0] = settings->video.msg_color_r / 2.0f;
paintBg[1] = settings->video.msg_color_g / 2.0f;
paintBg[2] = settings->video.msg_color_b / 2.0f;
paintBg[3] = 0.5f;
vgSetParameteri(vg->mPaintFg, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
vgSetParameterfv(vg->mPaintFg, VG_PAINT_COLOR, 4, paintFg);