diff options
author | Frank Neumann <fnu@yavdr.org> | 2017-05-21 21:31:57 +0200 |
---|---|---|
committer | Frank Neumann <fnu@yavdr.org> | 2017-05-21 21:31:57 +0200 |
commit | 627afe268e2ceaeca3d4d2dea51401019f7a10bf (patch) | |
tree | 84b0a82b4eb0745d12fcdeca2d0ee94166e3084c /status.c | |
parent | 8b83687aa11aabdf7e2c78bf22b48efe2bdd4403 (diff) | |
download | vdr-plugin-text2skin-627afe268e2ceaeca3d4d2dea51401019f7a10bf.tar.gz vdr-plugin-text2skin-627afe268e2ceaeca3d4d2dea51401019f7a10bf.tar.bz2 |
Add compatibility for VDR API >= 2.3.1.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -110,8 +110,14 @@ void cText2SkinStatus::Recording(const cDevice *Device, const char *Name, mRecordingsLock.Lock(); mRecordings.clear(); +#if APIVERSNUM < 20301 cTimer *t = Timers.First(); for (; t != NULL; t = Timers.Next(t)) { +#else + LOCK_TIMERS_READ; + const cTimer *t = Timers->First(); + for (; t != NULL; t = Timers->Next(t)) { +#endif if (t->Recording()) mRecordings.push_back(t->File()); } @@ -184,9 +190,17 @@ void cText2SkinStatus::UpdateEvents(void) mRender->mUpdate.events = false; mEvents.Clear(); +#if APIVERSNUM < 20301 Timers.IncBeingEdited(); +#else + LOCK_TIMERS_READ; +#endif +#if APIVERSNUM < 20301 for (cTimer *tim = Timers.First(); tim; tim = Timers.Next(tim)) { +#else + for (const cTimer *tim = Timers->First(); tim; tim = Timers->Next(tim)) { +#endif if (tim->HasFlags(tfActive)) { int i = 0; cTimer dummy; @@ -209,7 +223,9 @@ void cText2SkinStatus::UpdateEvents(void) } } +#if APIVERSNUM < 20301 Timers.DecBeingEdited(); +#endif mEvents.Sort(); } } |