From 35b917106cdb2ee7e9d430613362b38f7a91fbea Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 1 Jun 2012 04:59:53 +0000 Subject: [PATCH] videos properly resize on different resolutions --- .../shared_lib/sources/graphics/video_player.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/shared_lib/sources/graphics/video_player.cpp b/source/shared_lib/sources/graphics/video_player.cpp index 4289624a..9ad87dc0 100644 --- a/source/shared_lib/sources/graphics/video_player.cpp +++ b/source/shared_lib/sources/graphics/video_player.cpp @@ -1383,16 +1383,17 @@ 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; + const double HEIGHT_DEFAULT = 768; + const double WIDTH_DEFAULT = 1024; + +// const double HEIGHT_MULTIPLIER = 0.80; +// const double WIDTH_MULTIPLIER = 0.60; // const double HEIGHT_MULTIPLIER = 1.0; // const double WIDTH_MULTIPLIER = 1.0; + const double HEIGHT_MULTIPLIER = HEIGHT_DEFAULT / ctxPtr->height; + const double WIDTH_MULTIPLIER = WIDTH_DEFAULT / ctxPtr->width; -#endif + //printf("w x h = %d x %d\n",ctxPtr->width,ctxPtr->height); glBegin(GL_TRIANGLE_STRIP); glTexCoord2i(0, 1);