[Pkg-wmaker-commits] [wmtv] 16/48: wmtv: Fix calculation of bytes per line.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Feb 1 20:13:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmtv.
commit 2a2422f338505931748d5646067e9b82c11e7ef6
Author: Doug Torrance <dtorrance at piedmont.edu>
Date: Mon Feb 1 00:45:09 2016 -0500
wmtv: Fix calculation of bytes per line.
Patch by Yann Vernier <yann at donkey.dyndns.org>. From [1]:
From: Malcolm Parsons <malcolm at ivywell.screaming.net>
Subject: wmtv: incorrectly calculates bytes per line
Date: Mon, 09 Apr 2001 21:15:52 +0100
wmtv does not put the tv display in its window on my second head.
According to bttv, wmtv is telling bttv that the display is:
Display at ea800000 is 800 by 600, bytedepth 2, bpl 1600
If I use xawtv, it correctly sets the bpl value:
Display at ea800000 is 800 by 600, bytedepth 2, bpl 1664
wmtv is probably incorrectly assuming width * bytedepth = bpl.
From: Yann Vernier <yann at donkey.dyndns.org>
Subject: wmtv: incorrectly calculates bytes per line
Date: Sun, 15 Jul 2001 14:21:56 +0200
Found the problem, at least this fixes it for me at 1600x1200.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93439
---
src/wmtv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/wmtv.c b/src/wmtv.c
index edd545c..d2998f5 100644
--- a/src/wmtv.c
+++ b/src/wmtv.c
@@ -1264,7 +1264,7 @@ GetFrameBuffer(void)
int evbr, erbr, flr = 0;
int bankr, memr, depth;
int i, n;
- int bytesperline, bitsperpixel;
+ int bytesperline, bytesperpixel;
XPixmapFormatValues *pf;
if (!XGetWindowAttributes(display, DefaultRootWindow(display), &Winattr)) {
@@ -1294,13 +1294,13 @@ GetFrameBuffer(void)
}
}
- bitsperpixel = (depth+7) & 0xf8; /* Taken from */
- bytesperline = Winattr.width * bitsperpixel / 8; /* Gerd Knorr's xawtv */
+ bytesperpixel = (depth+7) & 0xf8;
+ bytesperline *= bytesperpixel;
vfb.base = baseaddr;
vfb.height = Winattr.height;
vfb.width = Winattr.width;
- vfb.depth = bitsperpixel;
+ vfb.depth = bytesperpixel;
vfb.bytesperline = bytesperline;
if (Winattr.depth == 15)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtv.git
More information about the Pkg-wmaker-commits
mailing list