summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Juergen Mauser <hjmauser@gmx.net>2011-09-17 11:22:30 +0200
committerTormod Volden <debian.tormod@gmail.com>2011-09-23 20:59:26 +0200
commitf27eac4b3fe9e6f13d3c54711488ebe7280f24dd (patch)
tree0c608a71fcf62b64b1758dc848dc53f0687775aa
parentd177ae0b11a1b47ce088cce8c3c6e0f94a706b5e (diff)
savage: Fix Xv scaling on non-native resolutions
If I set the resolution to 800x600 for example (to be able to use the TV output in full screen mode), I only can see 800/1024 = 0,78 of the real video width, no matter if the video is displayed in a small player window or enlarged to full screen. On the right of the video display, the remaining width is filled with a black (or sometimes blue) bar. The problem was mainly that only the drawing starting point was modified by the scaling factor, but not the size-defining end of the drawing rectangle. https://bugs.launchpad.net/bugs/670790 Signed-off-by: Hans-Juergen Mauser <hjmauser@gmx.net> Reviewed-by: Tormod Volden <debian.tormod@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/savage_video.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/savage_video.c b/src/savage_video.c
index 9f860c7..7d571ad 100644
--- a/src/savage_video.c
+++ b/src/savage_video.c
@@ -1508,9 +1508,13 @@ SavageDisplayVideoOld(
drw_h = (float)(drw_h * psav->YExp1)/(float)psav->YExp2+1;
dstBox->x1 = (float)(dstBox->x1 * psav->XExp1)/(float)psav->XExp2;
dstBox->y1 = (float)(dstBox->y1 * psav->YExp1)/(float)psav->YExp2;
+ dstBox->x2 = (dstBox->x2 * psav->XExp1) / psav->XExp2;
+ dstBox->y2 = (dstBox->y2 * psav->YExp1) / psav->YExp2;
dstBox->x1 += psav->displayXoffset;
dstBox->y1 += psav->displayYoffset;
+ dstBox->x2 += psav->displayXoffset;
+ dstBox->y2 += psav->displayYoffset;
}
/*
@@ -1668,8 +1672,12 @@ SavageDisplayVideoNew(
drw_h = (drw_h * psav->YExp1)/psav->YExp2 + 1;
dstBox->x1 = (dstBox->x1 * psav->XExp1)/psav->XExp2;
dstBox->y1 = (dstBox->y1 * psav->YExp1)/psav->YExp2;
+ dstBox->x2 = (dstBox->x2 * psav->XExp1) / psav->XExp2;
+ dstBox->y2 = (dstBox->y2 * psav->YExp1) / psav->YExp2;
dstBox->x1 += psav->displayXoffset;
dstBox->y1 += psav->displayYoffset;
+ dstBox->x2 += psav->displayXoffset;
+ dstBox->y2 += psav->displayYoffset;
}
if (psav->IsSecondary) {