diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | menu.c | 5 | ||||
-rw-r--r-- | osdbase.h | 3 | ||||
-rw-r--r-- | vdr.c | 21 |
4 files changed, 18 insertions, 13 deletions
@@ -9194,3 +9194,5 @@ Video Disk Recorder Revision History - If an event in the Schedules menu is marked with a 'T' or 'I' and the user presses the Red button to edit the timer, local timers are now preferred over remote timers in case there is more than one timer that will record that event. +- Switching the primary device is no longer done via osSwitchDvb (which has been + removed), but rather by the main program loop reacting to changes in Setup.PrimaryDVB. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 4.43 2017/11/02 15:26:42 kls Exp $ + * $Id: menu.c 4.44 2017/11/09 14:56:38 kls Exp $ */ #include "menu.h" @@ -3587,7 +3587,6 @@ void cMenuSetupDVB::Setup(void) eOSState cMenuSetupDVB::ProcessKey(eKeys Key) { - int oldPrimaryDVB = ::Setup.PrimaryDVB; int oldVideoDisplayFormat = ::Setup.VideoDisplayFormat; bool oldVideoFormat = ::Setup.VideoFormat; bool newVideoFormat = data.VideoFormat; @@ -3650,8 +3649,6 @@ eOSState cMenuSetupDVB::ProcessKey(eKeys Key) } } if (state == osBack && Key == kOk) { - if (::Setup.PrimaryDVB != oldPrimaryDVB) - state = osSwitchDvb; if (::Setup.VideoDisplayFormat != oldVideoDisplayFormat) cDevice::PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat(::Setup.VideoDisplayFormat)); if (::Setup.VideoFormat != oldVideoFormat) @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.h 4.3 2017/11/07 15:31:24 kls Exp $ + * $Id: osdbase.h 4.4 2017/11/09 14:57:48 kls Exp $ */ #ifndef __OSDBASE_H @@ -30,7 +30,6 @@ enum eOSState { osUnknown, osStopRecord, osStopReplay, osCancelEdit, - osSwitchDvb, osBack, osEnd, os_User, // the following values can be used locally @@ -22,7 +22,7 @@ * * The project's page is at http://www.tvdr.de * - * $Id: vdr.c 4.20 2017/11/02 14:59:50 kls Exp $ + * $Id: vdr.c 4.21 2017/11/09 16:15:34 kls Exp $ */ #include <getopt.h> @@ -732,6 +732,7 @@ int main(int argc, char *argv[]) bool InhibitEpgScan = false; bool IsInfoMenu = false; cSkin *CurrentSkin = NULL; + int OldPrimaryDVB = 0; // Load plugins: @@ -834,6 +835,7 @@ int main(int argc, char *argv[]) } } } + OldPrimaryDVB = Setup.PrimaryDVB; // Check for timers in automatic start time window: @@ -1426,12 +1428,6 @@ int main(int argc, char *argv[]) DELETE_MENU; cControl::Shutdown(); break; - case osSwitchDvb: - DELETE_MENU; - cControl::Shutdown(); - Skins.QueueMessage(mtInfo, tr("Switching primary DVB...")); - cDevice::SetPrimaryDevice(Setup.PrimaryDVB); - break; case osPlugin: DELETE_MENU; Menu = cMenuMain::PluginOsdObject(); if (Menu) @@ -1507,6 +1503,17 @@ int main(int argc, char *argv[]) } } + // Change primary device: + int NewPrimaryDVB = Setup.PrimaryDVB; + if (NewPrimaryDVB != OldPrimaryDVB) { + DELETE_MENU; + cControl::Shutdown(); + Skins.QueueMessage(mtInfo, tr("Switching primary DVB...")); + cOsdProvider::Shutdown(); + cDevice::SetPrimaryDevice(NewPrimaryDVB); + OldPrimaryDVB = NewPrimaryDVB; + } + // SIGHUP shall cause a restart: if (LastSignal == SIGHUP) { if (ShutdownHandler.ConfirmRestart(true) && Interface->Confirm(tr("Press any key to cancel restart"), RESTARTCANCELPROMPT, true)) |