summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2005-03-01 19:53:28 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2005-03-01 19:53:28 +0000
commit7eaf88d00d7539fde68422ae6566f23993aa2633 (patch)
treea831484e63ee2bcd8d62454a12b45206ea8a0643 /src
parent28d65bceaec3ef636f0f5bdd03b38fd76f87c8c6 (diff)
Fix an off by one error when scaling which caused occasional
overlay color lines at the far right and bottom of the window.
Diffstat (limited to 'src')
-rw-r--r--src/i830_video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 5e93a5ea..fed8c564 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1297,8 +1297,8 @@ I830DisplayVideo(ScrnInfoPtr pScrn, int id, short width, short height,
/*
* Y down-scale factor as a multiple of 4096.
*/
- xscaleFract = (src_w << 12) / drw_w;
- yscaleFract = (src_h << 12) / drw_h;
+ xscaleFract = ((src_w - 1) << 12) / drw_w;
+ yscaleFract = ((src_h - 1) << 12) / drw_h;
/* Calculate the UV scaling factor. */
xscaleFractUV = xscaleFract / uvratio;