#! /bin/sh /usr/share/dpatch/dpatch-run ## 02_fix-jumpplay.dpatch by Thomas Günther ## http://toms-cafe.de/vdr/download/extrecmenu-0.9-fix-jumpplay.diff ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fixes BIG(B|P)A(TCH|CK)VERSION confusion - using JUMPPLAYVERSNUM instead ## DP: to activate the jumpplay features (version >= 0.7 of jumpplay is needed). @DPATCH@ --- extrecmenu-0.9/myreplaycontrol.c +++ extrecmenu-0.9/myreplaycontrol.c @@ -14,10 +14,9 @@ char *myReplayControl::title = NULL; myReplayControl::myReplayControl(void) -#ifdef BIGPATCHVERSION +#ifdef JUMPPLAYVERSNUM :cDvbPlayerControl(fileName,&marks) -#endif -#ifndef BIGPATCHVERSION +#else :cDvbPlayerControl(fileName) #endif { @@ -29,7 +28,7 @@ timeoutShow = 0; timeSearchActive = false; marks.Load(fileName); -#ifdef BIGPACKVERSION +#ifdef JUMPPLAYVERSNUM lastLoadMarks = time(NULL); #endif cRecording Recording(fileName); @@ -253,15 +252,14 @@ ShowTimed(2); bool Play, Forward; int Speed; -#ifndef BIGPACKVERSION - if (GetReplayMode(Play, Forward, Speed) && !Play) - Goto(Current, true); -#endif -#ifdef BIGBACKVERSION +#ifdef JUMPPLAYVERSNUM if (GetReplayMode(Play, Forward, Speed) && !Play) { Goto(Current, true); displayFrames = true; } +#else + if (GetReplayMode(Play, Forward, Speed) && !Play) + Goto(Current, true); #endif } @@ -276,11 +274,7 @@ if (GetIndex(Current, Total)) { cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current); if (m) { -#ifndef BIGPACKVERSION - Goto(m->position, true); - displayFrames = true; -#endif -#ifdef BIGPACKVERSION +#ifdef JUMPPLAYVERSNUM bool Play2, Forward2; int Speed; if (Setup.JumpPlay && GetReplayMode(Play2, Forward2, Speed) && @@ -292,6 +286,9 @@ Goto(m->position, true); displayFrames = true; } +#else + Goto(m->position, true); + displayFrames = true; #endif } } @@ -347,11 +344,10 @@ if (!m) m = marks.GetNext(Current); if (m) { -#ifndef BIGPACKVERSION - if ((m->Index() & 0x01) != 0) -#endif -#ifdef BIGPACKVERSION +#ifdef JUMPPLAYVERSNUM if ((m->Index() & 0x01) != 0 && !Setup.PlayJump) +#else + if ((m->Index() & 0x01) != 0) #endif m = marks.Next(m); if (m) { @@ -374,7 +370,7 @@ { if (!Active()) return osEnd; -#ifdef BIGPACKVERSION +#ifdef JUMPPLAYVERSNUM if (Setup.LoadMarksInterval && time(NULL) >= lastLoadMarks + Setup.LoadMarksInterval) { marks.Load(fileName, true); --- extrecmenu-0.9/myreplaycontrol.h +++ extrecmenu-0.9/myreplaycontrol.h @@ -1,3 +1,4 @@ +#include #include #define MODETIMEOUT 3 // seconds @@ -11,7 +12,7 @@ bool lastPlay, lastForward; int lastSpeed; time_t timeoutShow; -#ifdef BIGPACKVERSION +#ifdef JUMPPLAYVERSNUM time_t lastLoadMarks; #endif bool timeSearchActive, timeSearchHide;