From 86b03fb03e7fe4e1ac0da98985068ab71e4a5ab8 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Mon, 15 Aug 2016 18:21:12 +0200 Subject: [PATCH] - treat Y button on Game Cube Controller, Classic Controller and Wii U Pro Controller like 1 button on the Wii Remote - treat X button on Game Cube Controller, Classic Controller and Wii U Pro Controller like 2 button on the Wii Remote - press Z on Game Cube Controller or L Classic Controller or Wii U Pro Controller to open Settings menu - press R on Classic Controller or Wii U Pro Controller to open External Applications menu (no unsued button left for Game Cube Controller) - previously only the first controller was honoured, now all four are being connected, though only the first one of each kind (Wii Remote, Game Cube Controller or Wii U Pro Controller) can be used, each additional non-unique controller is ignored --- installer/wad.vwii/0001000154484246.tmd | Bin 592 -> 592 bytes main/source/Menus/menu_main.cpp | 16 +++++++++++----- main/source/input.cpp | 2 +- main/source/menu.cpp | 7 ++++++- web/updates | 14 ++++++++++++++ 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/installer/wad.vwii/0001000154484246.tmd b/installer/wad.vwii/0001000154484246.tmd index d5bbbb35df297b2432e0e1e5de0015dc9991ac11..fd4bd4a9ad243ec95efd39cf4a075b2c046e2134 100644 GIT binary patch delta 30 ocmV+(0O9}81kePqIsz7E;G}m!RO*pJuqg53=E#+K^t=Le65DPL{Qv*} delta 30 mcmcb>a)D)o6_Z%Hf~}0?hFOQhQ|>xEdLXsGVrhF=>=OXD7Y$zk diff --git a/main/source/Menus/menu_main.cpp b/main/source/Menus/menu_main.cpp index 3b645b9..e681531 100644 --- a/main/source/Menus/menu_main.cpp +++ b/main/source/Menus/menu_main.cpp @@ -639,7 +639,9 @@ int MenuMain() if(mainWindow->GetState() != STATE_DISABLED) { // Sortieren - if(WPAD_ButtonsDown(0) & WPAD_BUTTON_1 && Settings.current_category != 0) + if((WPAD_ButtonsDown(0) & (WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y) && Settings.current_category != 0) + || (WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_Y && Settings.current_category != 0) + || (PAD_ButtonsDown(0) & PAD_BUTTON_Y && Settings.current_category != 0)) { switch (sortPrompt()) { @@ -720,7 +722,10 @@ int MenuMain() menu = MENU_EXIT; // ansicht wechseln - if(((WPAD_ButtonsDown(0) & WPAD_BUTTON_2) &! (WPAD_ButtonsDown(0) & WPAD_BUTTON_1)) || normal_grid_Btn.GetState() == STATE_CLICKED) + if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X) || + WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_X || + PAD_ButtonsDown(0) & PAD_BUTTON_X || + normal_grid_Btn.GetState() == STATE_CLICKED) { Settings.current_page = 1; if(Settings.grid) @@ -742,7 +747,8 @@ int MenuMain() button = "B"; // Settings - if(settings_Btn.GetState() == STATE_CLICKED) + if(settings_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_L + || PAD_ButtonsDown(0) & PAD_TRIGGER_Z || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_L) { menu = MENU_SETTINGS; } @@ -828,8 +834,8 @@ int MenuMain() } // Loader button - else if(loader_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & (WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME) - || PAD_ButtonsDown(0) & PAD_BUTTON_START || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_HOME) + else if(loader_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_R + || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_FULL_R) { loader_Btn.ResetState(); if(loaderPrompt() == MENU_EXIT) diff --git a/main/source/input.cpp b/main/source/input.cpp index 6ea20c1..c8f42e9 100644 --- a/main/source/input.cpp +++ b/main/source/input.cpp @@ -36,7 +36,7 @@ void UpdatePads() WPAD_ScanPads(); PAD_ScanPads(); - for(int i=3; i >= 0; i--) + for(int i=0; i < 4; i++) { userInput[i].wpad = WPAD_Data(i); userInput[i].chan = i; diff --git a/main/source/menu.cpp b/main/source/menu.cpp index da21469..4eedd49 100644 --- a/main/source/menu.cpp +++ b/main/source/menu.cpp @@ -186,7 +186,12 @@ UpdateGUI (void *arg) } // screenshoot - if(WPAD_ButtonsDown(0) & WPAD_BUTTON_1 && WPAD_ButtonsDown(0) & WPAD_BUTTON_2) + if(((WPAD_ButtonsDown(0) & (WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y)) && + (WPAD_ButtonsDown(0) & (WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X))) + || ((WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_Y) && + (WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_X)) + || ((PAD_ButtonsDown(0) & PAD_BUTTON_Y) && + (PAD_ButtonsDown(0) & PAD_BUTTON_X))) Screenshot(); } } diff --git a/web/updates b/web/updates index b404d8e..c7c6686 100644 --- a/web/updates +++ b/web/updates @@ -3,6 +3,20 @@ - remove 'All' button from device prompt in vWii builds - re-enable 'SD Gecko' setting in vWii builds - support for Wii U Pro Controller trough FIX94's libwupc +- support for Wii U Pro Controller in the installer +- treat Y button on Game Cube Controller, Classic Controller + and Wii U Pro Controller like 1 button on the Wii Remote +- treat X button on Game Cube Controller, Classic Controller + and Wii U Pro Controller like 2 button on the Wii Remote +- press Z on Game Cube Controller or L Classic Controller or + Wii U Pro Controller to open Settings menu +- press R on Classic Controller or Wii U Pro Controller to + open External Applications menu (no unsued button left for + Game Cube Controller) +- previously only the first controller was honoured, now all + four are being connected, though only the first one of each + kind (Wii Remote, Game Cube Controller or Wii U Pro Controller) + can be used, each additional non-unique controller is ignored - update german translation //rev45: