[mythtv] xinerama kludge
Fletch
mythtv-dev@snowman.net
11 Dec 2002 12:02:32 -0500
Just got everything going on my RH8 box yesterday (fairly smoothly
once I got all the prerequisite RPMs installed), but when I actually
watched TV it spread the picture out across both heads of my GeForce
4400. I came up with this quick patch which (along with the addition
of -lXinerama to the mythfrontend and mythtv make files) gets things
working on just the first head. And I just now noticed that there
probably should be a call to `XFree(sinfo)' in there somewhere.
diff -rwu orig/mythtv-0.7/libs/libNuppelVideo/XJ.cpp mythtv-0.7/libs/libNuppelVideo/XJ.cpp
--- orig/mythtv-0.7/libs/libNuppelVideo/XJ.cpp 2002-10-31 14:28:24.000000000 -0500
+++ mythtv-0.7/libs/libNuppelVideo/XJ.cpp 2002-12-10 18:04:14.000000000 -0500
@@ -19,7 +19,9 @@
#include <X11/keysym.h>
#include <X11/Xatom.h>
+
extern "C" {
+#include <X11/extensions/Xinerama.h>
extern int XShmQueryExtension(Display*);
extern int XShmGetEventBase(Display*);
extern XvImage *XvShmCreateImage(Display*, XvPortID, int, char*, int, int, XShmSegmentInfo*);
@@ -78,8 +80,18 @@
XJ_screen=DefaultScreenOfDisplay(XJ_disp);
XJ_screen_num=DefaultScreen(XJ_disp);
+ if( XineramaIsActive( XJ_disp ) ) {
+ // XXX Presume first screen
+ XineramaScreenInfo *sinfo;
+ int num_screens;
+
+ sinfo = XineramaQueryScreens( XJ_disp, &num_screens );
+ XJ_screenwidth = sinfo->width;
+ XJ_screenheight = sinfo->height;
+ } else {
XJ_screenwidth = DisplayWidth(XJ_disp, XJ_screen_num);
XJ_screenheight = DisplayHeight(XJ_disp, XJ_screen_num);
+ }
XJ_white=XWhitePixel(XJ_disp,XJ_screen_num);
XJ_black=XBlackPixel(XJ_disp,XJ_screen_num);
--
Fletch | "If you find my answers frightening, __`'/|
fletch@phydeaux.org | Vincent, you should cease askin' \ o.O'
770 294-0820 (m) | scary questions." -- Jules =(___)=
| U