aboutsummaryrefslogtreecommitdiffstats
path: root/v4l-conf.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:35 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:35 +0200
commit087a9f7a801636fd50495f9d409c00bd9ea65095 (patch)
tree2c2531e1737a884c61d7fdd9dfa5118cb3db8073 /v4l-conf.c
parent885583256f5ff22d91c1f860dfc798437f11b546 (diff)
v2.08
Diffstat (limited to 'v4l-conf.c')
-rw-r--r--v4l-conf.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/v4l-conf.c b/v4l-conf.c
index 91c02d3..764444f 100644
--- a/v4l-conf.c
+++ b/v4l-conf.c
@@ -9,7 +9,11 @@
#include "config.h"
#include <asm/types.h> /* XXX glibc */
-#include "videodev.h"
+#if USE_KERNEL_VIDEODEV
+# include <linux/videodev.h>
+#else
+# include "videodev.h"
+#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -35,7 +39,7 @@ main(int argc, char *argv[])
struct video_buffer fbuf;
int fd,c;
#ifdef HAVE_LIBXXF86DGA
- int foo,bar,fred,flags;
+ int width,bar,foo,flags;
void *base = 0;
#endif
@@ -98,9 +102,9 @@ main(int argc, char *argv[])
if (XF86DGAQueryExtension(dpy,&foo,&bar)) {
XF86DGAQueryDirectVideo(dpy,XDefaultScreen(dpy),&flags);
if (flags & XF86DGADirectPresent) {
- XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(int*)&base,&fred,&foo,&bar);
+ XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(int*)&base,&width,&foo,&bar);
if (verbose)
- fprintf(stderr,"dga: base=%p\n",base);
+ fprintf(stderr,"dga: base=%p, width=%d\n",base, width);
}
}
#endif
@@ -134,7 +138,7 @@ main(int argc, char *argv[])
}
#endif
fbuf.depth = wts.depth;
- fbuf.width = wts.width;
+ fbuf.width = (flags & XF86DGADirectPresent) ? width : wts.width;
fbuf.height = wts.height;
fbuf.bytesperline = fbuf.width * fbuf.depth/8;
if (-1 == ioctl(fd,VIDIOCSFBUF,&fbuf)) {

Privacy Policy