From 6cd9124d08713dc11a068f31bfa2cab266a1895b Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 22 Jan 2006 14:27:53 +0100 Subject: Improved channel switching when repeat function kicks in; updating channel display before switching channel; added a missing initialization of 'timeout' in the cDisplayChannel constructor --- vdr.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'vdr.c') diff --git a/vdr.c b/vdr.c index c96a3221..6e4d1857 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.242 2006/01/20 16:12:39 kls Exp $ + * $Id: vdr.c 1.243 2006/01/22 13:32:41 kls Exp $ */ #include @@ -822,6 +822,7 @@ int main(int argc, char *argv[]) } } break; + // Direct main menu functions: #define DirectMainFunction(function)\ DELETE_MENU;\ if (cControl::Control())\ @@ -855,7 +856,15 @@ int main(int argc, char *argv[]) case kChanUp: case kChanDn|k_Repeat: case kChanDn: - cDevice::SwitchChannel(NORMALKEY(key) == kChanUp ? 1 : -1); + if (!Interact) + Menu = new cDisplayChannel(NORMALKEY(key)); + else if (cDisplayChannel::IsOpen()) { + Interact->ProcessKey(key); + continue; + } + else + cDevice::SwitchChannel(NORMALKEY(key) == kChanUp ? 1 : -1); + key = kNone; // nobody else needs to see these keys break; // Volume control: case kVolUp|k_Repeat: @@ -995,21 +1004,17 @@ int main(int argc, char *argv[]) } // Direct Channel Select: case k1 ... k9: - Menu = new cDisplayChannel(key); - break; // Left/Right rotates trough channel groups: case kLeft|k_Repeat: case kLeft: case kRight|k_Repeat: case kRight: - Menu = new cDisplayChannel(NORMALKEY(key)); - break; // Up/Down Channel Select: case kUp|k_Repeat: case kUp: case kDown|k_Repeat: case kDown: - cDevice::SwitchChannel(NORMALKEY(key) == kUp ? 1 : -1); + Menu = new cDisplayChannel(NORMALKEY(key)); break; // Viewing Control: case kOk: LastChannel = -1; break; // forces channel display -- cgit v1.2.3