[mythtv] [PATCH] Display Resolution switching (Version 3)
John Patrick Poet
john at BlueSkyTours.com
Thu Aug 5 23:25:01 EDT 2004
Doug Larrick wrote:
> Doug Larrick wrote:
>
>> I'm using WindowMaker, though I'm certainly not tied to it. I'll
>> give it a try with Sawfish and FVWM and report back.
>
>
> I can confirm that on my system, none of Sawfish, Metacity,
> WindowMaker, or fvwm work properly in this case. My GUI resolution is
> 960x540, and I've tried video resolutions of 1920x540 and 1920x1080
> (interlaced).
>
> When I mentioned getting the videoout widget from within videoout, I
> was thinking more along the lines of exporting it from tv_play, and
> somehow getting ahold of the TV object in videoout.
>
> -Doug
Doug, please try the attached patch. It is crude, but I am curious if
it solved the problem.
Thanks,
John
-------------- next part --------------
Index: libs/libmythtv/tv_play.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/tv_play.cpp,v
retrieving revision 1.199
diff -u -d -r1.199 tv_play.cpp
--- libs/libmythtv/tv_play.cpp 5 Aug 2004 07:35:01 -0000 1.199
+++ libs/libmythtv/tv_play.cpp 6 Aug 2004 03:22:38 -0000
@@ -279,23 +279,39 @@
{
MythMainWindow *mainWindow = gContext->GetMainWindow();
bool fullscreen = !gContext->GetNumSetting("GuiSizeForTV", 0);
- if (fullscreen)
+ bool switchMode = gContext->GetNumSetting("UseVideoModes", 0);
+
+ if(switchMode)
+ {
+ mainWindow->setGeometry(0, 0, 1920, 1080);
+ mainWindow->setFixedSize(QSize(1920, 1080));
+ }
+ else if (fullscreen)
{
mainWindow->setGeometry(0, 0, QApplication::desktop()->width(),
QApplication::desktop()->height());
mainWindow->setFixedSize(QSize(QApplication::desktop()->width(),
QApplication::desktop()->height()));
}
- myWindow = new MythDialog(mainWindow, "video playback window");
+
+ myWindow = new MythDialog(mainWindow, "video playback window",
+ WType_TopLevel);
myWindow->installEventFilter(this);
myWindow->setNoErase();
- if (fullscreen)
+
+ if (switchMode)
+ {
+ myWindow->setGeometry(0, 0, 1920, 1080);
+ myWindow->setFixedSize(QSize(1920, 1080));
+ }
+ else if (fullscreen)
{
myWindow->setGeometry(0, 0, QApplication::desktop()->width(),
QApplication::desktop()->height());
myWindow->setFixedSize(QSize(QApplication::desktop()->width(),
QApplication::desktop()->height()));
}
+
myWindow->show();
myWindow->setBackgroundColor(Qt::black);
qApp->processEvents();
More information about the mythtv-dev
mailing list