summaryrefslogtreecommitdiff
path: root/patches/lcdproc-0.0.10-epg-update.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/lcdproc-0.0.10-epg-update.diff')
-rw-r--r--patches/lcdproc-0.0.10-epg-update.diff86
1 files changed, 86 insertions, 0 deletions
diff --git a/patches/lcdproc-0.0.10-epg-update.diff b/patches/lcdproc-0.0.10-epg-update.diff
new file mode 100644
index 0000000..980bb90
--- /dev/null
+++ b/patches/lcdproc-0.0.10-epg-update.diff
@@ -0,0 +1,86 @@
+diff -rup lcdproc-0.0.10.sav/lcd.c lcdproc-0.0.10/lcd.c
+--- lcdproc-0.0.10.sav/lcd.c Wed Nov 9 22:01:59 2005
++++ lcdproc-0.0.10/lcd.c Thu Jan 5 16:52:01 2006
+@@ -43,6 +43,7 @@ cLcd::cLcd() {
+ for (i=0;i<LCDMAXSTATEBUF;i++) LastState[i]=Title; LastStateP=0;
+ ThreadStateData.barx=1, ThreadStateData.bary=1, ThreadStateData.barl=0;
+ for (i=0;i<LCDMAXCARDS;i++) ThreadStateData.CardStat[i]=0;
++ channelSwitched = false;
+ }
+
+ cLcd::~cLcd() {
+@@ -667,12 +668,15 @@ void cLcd::Action(void) { // LCD output
+
+ voltime.tv_sec=0;
+ for (i=0;i<LCDMAXSTATES;i++) for (j=0;j<4;j++) Lcddirty[i][j]=true;
+- time_t nextLcdUpdate = (time(NULL)/60)*60+60;
+-
++ time_t nextLcdUpdate = 0; // trigger first update immediately
+ while (true) { // main loop, wakes up every WakeUpCycle, any output to LCDd is done here
+ gettimeofday(&now,NULL);
+
+ // epg update
++ if (channelSwitched) {
++ channelSwitched = false;
++ nextLcdUpdate = 0; //trigger next epg update
++ }
+
+ #ifdef OLDVDR
+
+@@ -700,8 +704,6 @@ void cLcd::Action(void) { // LCD output
+ }
+ if ( nextLcdUpdate <= time(NULL) )
+ nextLcdUpdate=(time(NULL)/60)*60+60;
+- else if ( nextLcdUpdate > time(NULL)+60 )
+- nextLcdUpdate=(time(NULL)/60)*60+60;
+ }
+
+ #else
+@@ -731,8 +733,6 @@ void cLcd::Action(void) { // LCD output
+ }
+ if ( nextLcdUpdate <= time(NULL) )
+ nextLcdUpdate=(time(NULL)/60)*60+60;
+- else if ( nextLcdUpdate > time(NULL)+60 )
+- nextLcdUpdate=(time(NULL)/60)*60+60;
+ }
+
+ #endif
+@@ -1023,4 +1023,8 @@ void cLcd::Action(void) { // LCD output
+ }
+ usleep(WakeUpCycle-(now.tv_usec%WakeUpCycle)); // sync to systemtime for nicer time output
+ }
++}
++
++void cLcd::ChannelSwitched() {
++ channelSwitched = true;
+ }
+diff -rup lcdproc-0.0.10.sav/lcd.h lcdproc-0.0.10/lcd.h
+--- lcdproc-0.0.10.sav/lcd.h Wed Nov 9 22:01:59 2005
++++ lcdproc-0.0.10/lcd.h Thu Jan 5 16:57:18 2006
+@@ -57,6 +57,7 @@ class cLcd : public cThread {
+ void PopThreadState();
+ void SetReplayDevice(cControl *DvbApi);
+ void SetPrimaryDevice(cDevice *DvbApi);
++ void ChannelSwitched(); //to propagate "ChannelSwitched"-Event from cLcdFeed to cLcd
+ private:
+ char *SummaryText;
+ unsigned int SummaryTextL;
+@@ -75,6 +76,7 @@ class cLcd : public cThread {
+ void GetTimeDateStat( char *string, unsigned int OutStateData[] );
+ void Action(void);
+ int closing ;
++ bool channelSwitched;
+ };
+
+ #endif //__LCD_H
+diff -rup lcdproc-0.0.10.sav/lcdproc.c lcdproc-0.0.10/lcdproc.c
+--- lcdproc-0.0.10.sav/lcdproc.c Wed Nov 9 22:01:59 2005
++++ lcdproc-0.0.10/lcdproc.c Thu Jan 5 16:32:59 2006
+@@ -73,6 +73,7 @@ void cLcdFeed::ChannelSwitch(const cDevi
+ LCDproc->SetLine(1,2," ");
+ LCDproc->SetLine(1,3," ");
+ LCDproc->SetRunning(false,tr("Waiting for EPG info."), NULL);
++ LCDproc->ChannelSwitched();
+ switched = true;
+ } else switched = false;
+ LCDproc->SetPrimaryDevice( (cDevice *) Device );