From 5b33a1463869f3c457df1a4ae64022983eaefee4 Mon Sep 17 00:00:00 2001 From: anbr Date: Sat, 3 Mar 2012 20:28:58 +0100 Subject: =?UTF-8?q?Fix=20warning:=20case=20value=20=E2=80=98x=E2=80=99=20n?= =?UTF-8?q?ot=20in=20enumerated=20type=20=E2=80=98eKeys=E2=80=99=20[-Wswit?= =?UTF-8?q?ch]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands.c | 12 +++--------- menu.c | 12 ++---------- setup.c | 4 +--- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/commands.c b/commands.c index 77127d7..82d1e85 100644 --- a/commands.c +++ b/commands.c @@ -243,12 +243,10 @@ eOSState cCMDDir::ProcessKey(eKeys Key) { case csNone: mItem = (cMainMenuItem*)Get(Current()); - switch(Key) + switch(Key & ~k_Repeat) { case kUp: - case kUp|k_Repeat: case kDown: - case kDown|k_Repeat: cOsdMenu::ProcessKey(Key); SetHelp(); mItem = (cMainMenuItem*)Get(Current()); @@ -580,12 +578,10 @@ eOSState cCMDMove::ProcessKey(eKeys Key) cDirHandling *DirHand = NULL; cFileMoveThread *move = NULL; - switch(Key) + switch(Key & ~k_Repeat) { case kUp: - case kUp|k_Repeat: case kDown: - case kDown|k_Repeat: cOsdMenu::ProcessKey(Key); SetHelp(); mItem = (cMainMenuItem*)Get(Current()); @@ -795,12 +791,10 @@ eOSState cCMDImageRead::ProcessKey(eKeys Key) { if(!HasSubMenu()) { - switch(Key) + switch(Key & ~k_Repeat) { case kUp: - case kUp|k_Repeat: case kDown: - case kDown|k_Repeat: cOsdMenu::ProcessKey(Key); SetHelp(); return osContinue; diff --git a/menu.c b/menu.c index 908f29b..87bbb5f 100644 --- a/menu.c +++ b/menu.c @@ -556,16 +556,12 @@ eOSState cMainMenu::ProcessKey(eKeys Key) } break; default: - switch(Key) + switch(Key & ~k_Repeat) { case kUp: - case kUp|k_Repeat: case kDown: - case kDown|k_Repeat: case kRight: - case kRight|k_Repeat: case kLeft: - case kLeft|k_Repeat: return MenuMove(Key); break; case k1: @@ -602,12 +598,10 @@ eOSState cMainMenu::MenuMove(eKeys Key) if(DVDSwitchSetup.DisplayMode == 1) { - switch(Key) + switch(Key & ~k_Repeat) { case kDown: - case kDown|k_Repeat: case kUp: - case kUp|k_Repeat: state = cOsdMenu::ProcessKey(Key); if(Count() && Current() == FirstSelectable) @@ -619,7 +613,6 @@ eOSState cMainMenu::MenuMove(eKeys Key) } break; case kLeft: - case kLeft|k_Repeat: if(Count() && DVDSwitchSetup.JumpCatByKey) { @@ -685,7 +678,6 @@ eOSState cMainMenu::MenuMove(eKeys Key) } break; case kRight: - case kRight|k_Repeat: if(Count() && DVDSwitchSetup.JumpCatByKey) { diff --git a/setup.c b/setup.c index 57ab3b8..d7a860f 100644 --- a/setup.c +++ b/setup.c @@ -340,7 +340,7 @@ eOSState cMenuSetupDVDSwitch::ProcessKey(eKeys Key) { const char *ItemText = Get(Current())->Text(); - switch(Key) + switch(Key & ~k_Repeat) { case kRight: case kLeft: @@ -406,9 +406,7 @@ eOSState cMenuSetupDVDSwitch::ProcessKey(eKeys Key) } break; case kUp: - case kUp|k_Repeat: case kDown: - case kDown|k_Repeat: state = cMenuSetupPage::ProcessKey(Key); ItemText = Get(Current())->Text(); -- cgit v1.2.3