summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/device.c b/device.c
index 9f5ddd4b..76cf0c7f 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c,v 1.11 2006-08-18 02:22:48 phintuka Exp $
+ * $Id: device.c,v 1.12 2006-08-21 21:24:05 phintuka Exp $
*
*/
@@ -260,6 +260,8 @@ void cXinelibDevice::ForcePrimaryDevice(bool On)
TRACEF("cXinelibDevice::ForcePrimaryDevice");
+ /* TODO: All this stuff should really be done in VDR main thread context... */
+
if(On) {
Counter++;
if(xc.force_primary_device) {
@@ -290,11 +292,13 @@ void cXinelibDevice::ForcePrimaryDevice(bool On)
if(cOsd::IsOpen()) {
LOGMSG("Restoring primary device, xineliboutput OSD still open !");
#if VDRVERSNUM >= 10400
- xc.main_menu_mode = CloseOsd;
+ xc.main_menu_mode = CloseOsd; /* will be executed in future by vdr main thread */
cRemote::CallPlugin("xineliboutput");
#endif
}
+ cChannel *channel = Channels.GetByNumber(CurrentChannel());
cDevice::SetPrimaryDevice(Original);
+ PrimaryDevice()->SwitchChannel(channel, true);
Original = 0;
}
}