summaryrefslogtreecommitdiff
path: root/control.c
diff options
context:
space:
mode:
authorMidas <vdrportal_midas@gmx.de>2010-06-04 04:29:45 +0200
committerMidas <vdrportal_midas@gmx.de>2010-06-04 04:29:45 +0200
commit1fed95e0f593cf9835316533cdca257bc6e199cf (patch)
treec84eeb53b22f6e67d8fa85250baeb0d7eea7dd2c /control.c
parentf9aace9ae188a9e3eec61400f2f0ea996f10aff5 (diff)
downloadvdr-plugin-block-1fed95e0f593cf9835316533cdca257bc6e199cf.tar.gz
vdr-plugin-block-1fed95e0f593cf9835316533cdca257bc6e199cf.tar.bz2
It turned out the former version of the 'Channel EPG' method
sometimes did not switch in the right direction only on VDR 1.7.*. I had to do quite a lot of research to cut out this nasty little bug. Again i hope its finally fixed now ;). Thanks again to igel and vdrtux for testing and reporting.
Diffstat (limited to 'control.c')
-rw-r--r--control.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/control.c b/control.c
index 4974888..c573439 100644
--- a/control.c
+++ b/control.c
@@ -15,9 +15,8 @@ inline uint64_t BlockTimeout() { return SetupBlock.MessageTimeout * 1000; }
bool cControlBlock::mRequested = false;
-cControlBlock::cControlBlock(int LastChannel, const cChannel *Channel, const cEvent *Present, const cEvent *Following):
+cControlBlock::cControlBlock(const cChannel *Channel, const cEvent *Present, const cEvent *Following):
cControl(new cPlayer),
- mLastChannel(LastChannel),
mChannel(Channel),
mPresent(Present),
mFollowing(Following),
@@ -58,12 +57,13 @@ cControlBlock::~cControlBlock()
}
if (mSwitch) {
+ int lastchannel=cSetupBlock::LastChannel;
// possibly first or last available channel, fall back to old channel
- int direction = mChannel->Number() - mLastChannel;
+ int direction = mChannel->Number() - lastchannel;
if (direction == 0)
direction = 1;
- if (!cDevice::SwitchChannel(direction) && (mLastChannel != 0))
- Channels.SwitchTo(mLastChannel);
+ if (!cDevice::SwitchChannel(direction) && (lastchannel != 0))
+ Channels.SwitchTo(lastchannel);
}
}