mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed toggling channels with the '0' key
This commit is contained in:
parent
2eec57fe18
commit
3a27bdfeda
@ -334,6 +334,7 @@ Mirko G
|
|||||||
for suggesting the SVDRP command VOLU
|
for suggesting the SVDRP command VOLU
|
||||||
for reporting a bug in keeping track of the current channel number when moving
|
for reporting a bug in keeping track of the current channel number when moving
|
||||||
channels in the "Channels" menu
|
channels in the "Channels" menu
|
||||||
|
for reporting a bug in toggling channels with the '0' key
|
||||||
|
|
||||||
Achim Lange <Achim_Lange@t-online.de>
|
Achim Lange <Achim_Lange@t-online.de>
|
||||||
for replacing 'killproc' with 'killall' in 'runvdr' to make it work on Debian
|
for replacing 'killproc' with 'killall' in 'runvdr' to make it work on Debian
|
||||||
|
2
HISTORY
2
HISTORY
@ -2307,3 +2307,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed freezing replay if a timer starts while in Transfer Mode from the device
|
- Fixed freezing replay if a timer starts while in Transfer Mode from the device
|
||||||
used by the timer, and the timer needs a different transponder (thanks to
|
used by the timer, and the timer needs a different transponder (thanks to
|
||||||
Richard Robson for reporting this one).
|
Richard Robson for reporting this one).
|
||||||
|
- Fixed toggling channels with the '0' key (thanks to Mirko Günther for reporting
|
||||||
|
this one).
|
||||||
|
18
vdr.c
18
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.cadsoft.de/vdr
|
* The project's page is at http://www.cadsoft.de/vdr
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 1.163 2003/08/16 09:15:28 kls Exp $
|
* $Id: vdr.c 1.164 2003/08/16 15:21:35 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -457,8 +457,8 @@ int main(int argc, char *argv[])
|
|||||||
cOsdObject *Temp = NULL;
|
cOsdObject *Temp = NULL;
|
||||||
int LastChannel = -1;
|
int LastChannel = -1;
|
||||||
int LastTimerChannel = -1;
|
int LastTimerChannel = -1;
|
||||||
int PreviousChannel = cDevice::CurrentChannel();
|
int PreviousChannel[2] = { 1, 1 };
|
||||||
int LastLastChannel = PreviousChannel;
|
int PreviousChannelIndex = 0;
|
||||||
time_t LastChannelChanged = time(NULL);
|
time_t LastChannelChanged = time(NULL);
|
||||||
time_t LastActivity = 0;
|
time_t LastActivity = 0;
|
||||||
int MaxLatencyTime = 0;
|
int MaxLatencyTime = 0;
|
||||||
@ -500,10 +500,8 @@ int main(int argc, char *argv[])
|
|||||||
LastChannel = cDevice::CurrentChannel();
|
LastChannel = cDevice::CurrentChannel();
|
||||||
LastChannelChanged = time(NULL);
|
LastChannelChanged = time(NULL);
|
||||||
}
|
}
|
||||||
if (LastLastChannel != LastChannel && time(NULL) - LastChannelChanged >= ZAPTIMEOUT) {
|
if (time(NULL) - LastChannelChanged >= ZAPTIMEOUT && LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
|
||||||
PreviousChannel = LastLastChannel;
|
PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel;
|
||||||
LastLastChannel = LastChannel;
|
|
||||||
}
|
|
||||||
// Timers and Recordings:
|
// Timers and Recordings:
|
||||||
if (!Timers.BeingEdited()) {
|
if (!Timers.BeingEdited()) {
|
||||||
time_t Now = time(NULL); // must do both following calls with the exact same time!
|
time_t Now = time(NULL); // must do both following calls with the exact same time!
|
||||||
@ -682,9 +680,9 @@ int main(int argc, char *argv[])
|
|||||||
switch (key) {
|
switch (key) {
|
||||||
// Toggle channels:
|
// Toggle channels:
|
||||||
case k0: {
|
case k0: {
|
||||||
int CurrentChannel = cDevice::CurrentChannel();
|
if (PreviousChannel[PreviousChannelIndex ^ 1] == LastChannel || LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
|
||||||
Channels.SwitchTo(PreviousChannel);
|
PreviousChannelIndex ^= 1;
|
||||||
PreviousChannel = CurrentChannel;
|
Channels.SwitchTo(PreviousChannel[PreviousChannelIndex ^= 1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Direct Channel Select:
|
// Direct Channel Select:
|
||||||
|
Loading…
Reference in New Issue
Block a user