From 2e36b13c79c0ca175e8e357a509716a59206d84c Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Wed, 21 Mar 2012 20:04:35 +0100 Subject: [PATCH] simplify --- installer/source/menu.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/installer/source/menu.cpp b/installer/source/menu.cpp index dd56c74..d9b1d14 100644 --- a/installer/source/menu.cpp +++ b/installer/source/menu.cpp @@ -142,8 +142,8 @@ int menu_main(int scrollpos) WPAD_ScanPads(); PAD_ScanPads(); - if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) && scrollpos < (signed)text1.size() -1) - | (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN && scrollpos < (signed)text1.size() -1)) + if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) + || (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)) && scrollpos < (signed)text1.size() -1) { scrollpos++; while(text1[scrollpos] == "") @@ -151,8 +151,8 @@ int menu_main(int scrollpos) scroll = true; } - else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) && scrollpos != 0) - | (PAD_ButtonsDown(0) & PAD_BUTTON_UP && scrollpos != 0)) + else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) + || (PAD_ButtonsDown(0) & PAD_BUTTON_UP)) && scrollpos != 0) { scrollpos--; while(text1[scrollpos] == "") @@ -221,14 +221,14 @@ int menu_install_uninstall(int install) WPAD_ScanPads(); PAD_ScanPads(); - if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) && scrollpos < (signed)text1.size() -1) - | (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN && scrollpos < (signed)text2.size() -1)) + if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) + || (PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)) && scrollpos < (signed)text2.size() -1) { scrollpos++; scroll = true; } - else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) && scrollpos != 0) - | (PAD_ButtonsDown(0) & PAD_BUTTON_UP && scrollpos != 0)) + else if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) + || (PAD_ButtonsDown(0) & PAD_BUTTON_UP)) && scrollpos != 0) { scrollpos--; scroll = true;