Moved the main program loop variables further up to allow compilation with older compiler versions

This commit is contained in:
Klaus Schmidinger 2004-10-31 09:37:56 +01:00
parent fc0596d859
commit 3e3f30d88d
3 changed files with 21 additions and 15 deletions

View File

@ -1065,6 +1065,8 @@ Marco Schl
should fail and all PIDs added so far should be deleted
for fixing attaching a cPlayer to a cDevice, so that 'Operation not permited'
errors don't occur any more
for reporting a problem with initialization of the main program loop variables
with older compiler versions
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP

View File

@ -3078,7 +3078,7 @@ Video Disk Recorder Revision History
This avoids shortly seeing the wrong events in the channel display when
switching to a channel that hasn't been tuned to in a while.
2004-10-30: Version 1.3.15
2004-10-31: Version 1.3.15
- Fixed some typos in the Makefile's 'font' target (thanks to Uwe Hanke).
- Added more checks and polling when getting frontend events (based on a patch
@ -3087,3 +3087,5 @@ Video Disk Recorder Revision History
(apparently setting "live" PIDs before the tuner is locked doesn't hurt).
Moved the wait into cDevice::AttachReceiver() instead.
- Immediately displaying the new channel info when switching channel groups.
- Moved the main program loop variables further up to allow compilation with
older compiler versions (thanks to Marco Schlüßler for reporting this one).

30
vdr.c
View File

@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
* $Id: vdr.c 1.190 2004/10/24 14:01:11 kls Exp $
* $Id: vdr.c 1.191 2004/10/31 09:35:55 kls Exp $
*/
#include <getopt.h>
@ -347,6 +347,21 @@ int main(int argc, char *argv[])
isyslog("VDR version %s started", VDRVERSION);
// Main program loop variables - need to be here to have them initialized before any EXIT():
cOsdObject *Menu = NULL;
cOsdObject *Temp = NULL;
int LastChannel = -1;
int LastTimerChannel = -1;
int PreviousChannel[2] = { 1, 1 };
int PreviousChannelIndex = 0;
time_t LastChannelChanged = time(NULL);
time_t LastActivity = 0;
int MaxLatencyTime = 0;
bool ForceShutdown = false;
bool UserShutdown = false;
bool TimerInVpsMargin = false;
// Load plugins:
if (!PluginManager.LoadPlugins(true))
@ -490,19 +505,6 @@ int main(int argc, char *argv[])
// Main program loop:
static cOsdObject *Menu = NULL;
static cOsdObject *Temp = NULL;
static int LastChannel = -1;
static int LastTimerChannel = -1;
static int PreviousChannel[2] = { 1, 1 };
static int PreviousChannelIndex = 0;
static time_t LastChannelChanged = time(NULL);
static time_t LastActivity = 0;
static int MaxLatencyTime = 0;
static bool ForceShutdown = false;
static bool UserShutdown = false;
static bool TimerInVpsMargin = false;
while (!Interrupted) {
// Handle emergency exits:
if (cThread::EmergencyExit()) {