From 8ba7fd0fa0fc46fafe767fdd0317eb16c9caaba8 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 21 May 2012 21:31:15 +0000 Subject: [PATCH] - updated screen render size for videos for win32 --- source/shared_lib/sources/graphics/video_player.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/shared_lib/sources/graphics/video_player.cpp b/source/shared_lib/sources/graphics/video_player.cpp index b792ed14..fb535b2b 100644 --- a/source/shared_lib/sources/graphics/video_player.cpp +++ b/source/shared_lib/sources/graphics/video_player.cpp @@ -1333,15 +1333,22 @@ bool VideoPlayer::playFrame(bool swapBuffers) { // glVertex2f(ctxPtr->x, ctxPtr->y); // glEnd(); +#ifdef WIN32 + const double HEIGHT_MULTIPLIER = 1.0; + const double WIDTH_MULTIPLIER = 1.0; +#else + const double HEIGHT_MULTIPLIER = 0.80; + const double WIDTH_MULTIPLIER = 0.60; +#endif glBegin(GL_TRIANGLE_STRIP); glTexCoord2i(0, 1); - glVertex2i(ctxPtr->x, ctxPtr->y + ctxPtr->height * 0.80); + glVertex2i(ctxPtr->x, ctxPtr->y + ctxPtr->height * HEIGHT_MULTIPLIER); glTexCoord2i(0, 0); glVertex2i(ctxPtr->x, ctxPtr->y); glTexCoord2i(1, 1); - glVertex2i(ctxPtr->x+ctxPtr->width * 0.60, ctxPtr->y+ctxPtr->height * 0.80); + glVertex2i(ctxPtr->x+ctxPtr->width * WIDTH_MULTIPLIER, ctxPtr->y+ctxPtr->height * HEIGHT_MULTIPLIER); glTexCoord2i(1, 0); - glVertex2i(ctxPtr->x+ctxPtr->width * 0.60, ctxPtr->y); + glVertex2i(ctxPtr->x+ctxPtr->width * WIDTH_MULTIPLIER, ctxPtr->y); glEnd(); }