Fixed cSchedule::GetFollowingEvent() in case there is currently no present event running

This commit is contained in:
Klaus Schmidinger 2006-02-26 15:10:02 +01:00
parent 46ad11bcf8
commit 58985f6dc1
3 changed files with 14 additions and 1 deletions

View File

@ -1767,3 +1767,7 @@ B
Christoph Haubrich <christoph1.haubrich@arcor.de>
for making the "Ok" key in the "Jump" mode of the replay progress display confirm
the jump instead of closing the display
Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present
event running

View File

@ -4412,3 +4412,5 @@ Video Disk Recorder Revision History
(suggested by Matthias Schniedermeyer).
- The DrawBitmap() function now has a new parameter 'Overlay' that allows a bitmap
to be drawn with a transparent background (thanks to Alexander Hans).
- Fixed cSchedule::GetFollowingEvent() in case there is currently no present event
running (thanks to Pekka Mauno).

9
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
* $Id: epg.c 1.63 2006/02/26 13:54:44 kls Exp $
* $Id: epg.c 1.64 2006/02/26 15:07:17 kls Exp $
*/
#include "epg.h"
@ -691,6 +691,13 @@ const cEvent *cSchedule::GetFollowingEvent(void) const
const cEvent *p = GetPresentEvent();
if (p)
p = events.Next(p);
else {
time_t now = time(NULL);
for (p = events.First(); p; p = events.Next(p)) {
if (p->StartTime() >= now)
break;
}
}
return p;
}