mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 02:41:55 +01:00
-updated button mapping and names for wiiflow input
-moved classic controller ZL and ZR to regular L and R, also removed the double control with Plus/Minus on classic controller -only clearing the region needed for the homebrew stub now before booting homebrew, no need for more cleaning up
This commit is contained in:
parent
39bc8f0617
commit
7b281c29d4
@ -3,51 +3,45 @@
|
||||
#define WBTN_DOWN (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN)
|
||||
#define WBTN_LEFT (WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT)
|
||||
#define WBTN_RIGHT (WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT)
|
||||
#define WBTN_PLUS (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS)
|
||||
#define WBTN_MINUS (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS)
|
||||
#define WBTN_HOME (WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME)
|
||||
#define WBTN_MINUS (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_FULL_L)
|
||||
#define WBTN_PLUS (WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_FULL_R)
|
||||
#define WBTN_A (WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A)
|
||||
#define WBTN_B (WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B)
|
||||
#define WBTN_1 (WPAD_BUTTON_1 | WPAD_CLASSIC_BUTTON_Y)
|
||||
#define WBTN_2 (WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X)
|
||||
#define WBTN_ZL (WPAD_CLASSIC_BUTTON_ZL)
|
||||
#define WBTN_ZR (WPAD_CLASSIC_BUTTON_ZR)
|
||||
|
||||
#define WBTN_UP_PRESSED (wii_btnsPressed & WBTN_UP)
|
||||
#define WBTN_DOWN_PRESSED (wii_btnsPressed & WBTN_DOWN)
|
||||
#define WBTN_LEFT_PRESSED (wii_btnsPressed & WBTN_LEFT)
|
||||
#define WBTN_RIGHT_PRESSED (wii_btnsPressed & WBTN_RIGHT)
|
||||
#define WBTN_HOME_PRESSED (wii_btnsPressed & WBTN_HOME)
|
||||
#define WBTN_MINUS_PRESSED (wii_btnsPressed & WBTN_MINUS)
|
||||
#define WBTN_PLUS_PRESSED (wii_btnsPressed & WBTN_PLUS)
|
||||
#define WBTN_HOME_PRESSED (wii_btnsPressed & WBTN_HOME)
|
||||
#define WBTN_A_PRESSED (wii_btnsPressed & WBTN_A)
|
||||
#define WBTN_B_PRESSED (wii_btnsPressed & WBTN_B)
|
||||
#define WBTN_1_PRESSED (wii_btnsPressed & WBTN_1)
|
||||
#define WBTN_2_PRESSED (wii_btnsPressed & WBTN_2)
|
||||
#define WBTN_ZL_PRESSED (wii_btnsPressed & WBTN_ZL)
|
||||
#define WBTN_ZR_PRESSED (wii_btnsPressed & WBTN_ZR)
|
||||
|
||||
#define WBTN_UP_HELD (wii_btnsHeld & WBTN_UP)
|
||||
#define WBTN_DOWN_HELD (wii_btnsHeld & WBTN_DOWN)
|
||||
#define WBTN_LEFT_HELD (wii_btnsHeld & WBTN_LEFT)
|
||||
#define WBTN_RIGHT_HELD (wii_btnsHeld & WBTN_RIGHT)
|
||||
#define WBTN_HOME_HELD (wii_btnsHeld & WBTN_HOME)
|
||||
#define WBTN_MINUS_HELD (wii_btnsHeld & WBTN_MINUS)
|
||||
#define WBTN_PLUS_HELD (wii_btnsHeld & WBTN_PLUS)
|
||||
#define WBTN_HOME_HELD (wii_btnsHeld & WBTN_HOME)
|
||||
#define WBTN_A_HELD (wii_btnsHeld & WBTN_A)
|
||||
#define WBTN_B_HELD (wii_btnsHeld & WBTN_B)
|
||||
#define WBTN_1_HELD (wii_btnsHeld & WBTN_1)
|
||||
#define WBTN_2_HELD (wii_btnsHeld & WBTN_2)
|
||||
#define WBTN_ZL_HELD (wii_btnsHeld & WBTN_ZL)
|
||||
#define WBTN_ZR_HELD (wii_btnsHeld & WBTN_ZR)
|
||||
|
||||
#define GBTN_UP (PAD_BUTTON_UP)
|
||||
#define GBTN_DOWN (PAD_BUTTON_DOWN)
|
||||
#define GBTN_LEFT (PAD_BUTTON_LEFT)
|
||||
#define GBTN_RIGHT (PAD_BUTTON_RIGHT)
|
||||
#define GBTN_PLUS (PAD_TRIGGER_R)
|
||||
#define GBTN_MINUS (PAD_TRIGGER_L)
|
||||
#define GBTN_HOME (PAD_BUTTON_MENU)
|
||||
#define GBTN_START (PAD_BUTTON_MENU)
|
||||
#define GBTN_L (PAD_TRIGGER_L)
|
||||
#define GBTN_R (PAD_TRIGGER_R)
|
||||
#define GBTN_A (PAD_BUTTON_A)
|
||||
#define GBTN_B (PAD_BUTTON_B)
|
||||
#define GBTN_1 (PAD_BUTTON_Y)
|
||||
@ -57,9 +51,9 @@
|
||||
#define GBTN_DOWN_PRESSED (gc_btnsPressed & GBTN_DOWN)
|
||||
#define GBTN_LEFT_PRESSED (gc_btnsPressed & GBTN_LEFT)
|
||||
#define GBTN_RIGHT_PRESSED (gc_btnsPressed & GBTN_RIGHT)
|
||||
#define GBTN_MINUS_PRESSED (gc_btnsPressed & GBTN_MINUS)
|
||||
#define GBTN_PLUS_PRESSED (gc_btnsPressed & GBTN_PLUS)
|
||||
#define GBTN_HOME_PRESSED (gc_btnsPressed & GBTN_HOME)
|
||||
#define GBTN_START_PRESSED (gc_btnsPressed & GBTN_START)
|
||||
#define GBTN_L_PRESSED (gc_btnsPressed & GBTN_L)
|
||||
#define GBTN_R_PRESSED (gc_btnsPressed & GBTN_R)
|
||||
#define GBTN_A_PRESSED (gc_btnsPressed & GBTN_A)
|
||||
#define GBTN_B_PRESSED (gc_btnsPressed & GBTN_B)
|
||||
#define GBTN_1_PRESSED (gc_btnsPressed & GBTN_1)
|
||||
@ -69,9 +63,9 @@
|
||||
#define GBTN_DOWN_HELD (gc_btnsHeld & GBTN_DOWN)
|
||||
#define GBTN_LEFT_HELD (gc_btnsHeld & GBTN_LEFT)
|
||||
#define GBTN_RIGHT_HELD (gc_btnsHeld & GBTN_RIGHT)
|
||||
#define GBTN_MINUS_HELD (gc_btnsHeld & GBTN_MINUS)
|
||||
#define GBTN_PLUS_HELD (gc_btnsHeld & GBTN_PLUS)
|
||||
#define GBTN_HOME_HELD (gc_btnsHeld & GBTN_HOME)
|
||||
#define GBTN_START_HELD (gc_btnsHeld & GBTN_START)
|
||||
#define GBTN_L_HELD (gc_btnsHeld & GBTN_L)
|
||||
#define GBTN_R_HELD (gc_btnsHeld & GBTN_R)
|
||||
#define GBTN_A_HELD (gc_btnsHeld & GBTN_A)
|
||||
#define GBTN_B_HELD (gc_btnsHeld & GBTN_B)
|
||||
#define GBTN_1_HELD (gc_btnsHeld & GBTN_1)
|
||||
@ -81,9 +75,9 @@
|
||||
#define BTN_DOWN_PRESSED (WBTN_DOWN_PRESSED || GBTN_DOWN_PRESSED)
|
||||
#define BTN_LEFT_PRESSED (WBTN_LEFT_PRESSED || GBTN_LEFT_PRESSED)
|
||||
#define BTN_RIGHT_PRESSED (WBTN_RIGHT_PRESSED || GBTN_RIGHT_PRESSED)
|
||||
#define BTN_MINUS_PRESSED (WBTN_ZL_PRESSED || WBTN_MINUS_PRESSED || GBTN_MINUS_PRESSED)
|
||||
#define BTN_PLUS_PRESSED (WBTN_ZR_PRESSED || WBTN_PLUS_PRESSED || GBTN_PLUS_PRESSED)
|
||||
#define BTN_HOME_PRESSED (WBTN_HOME_PRESSED || GBTN_HOME_PRESSED)
|
||||
#define BTN_HOME_PRESSED (WBTN_HOME_PRESSED || GBTN_START_PRESSED)
|
||||
#define BTN_MINUS_PRESSED (WBTN_MINUS_PRESSED || GBTN_L_PRESSED)
|
||||
#define BTN_PLUS_PRESSED (WBTN_PLUS_PRESSED || GBTN_R_PRESSED)
|
||||
#define BTN_A_PRESSED (WBTN_A_PRESSED || GBTN_A_PRESSED)
|
||||
#define BTN_B_PRESSED (WBTN_B_PRESSED || GBTN_B_PRESSED)
|
||||
#define BTN_1_PRESSED (WBTN_1_PRESSED || GBTN_1_PRESSED)
|
||||
@ -93,9 +87,9 @@
|
||||
#define BTN_DOWN_HELD (WBTN_DOWN_HELD || GBTN_DOWN_HELD)
|
||||
#define BTN_LEFT_HELD (WBTN_LEFT_HELD || GBTN_LEFT_HELD)
|
||||
#define BTN_RIGHT_HELD (WBTN_RIGHT_HELD || GBTN_RIGHT_HELD)
|
||||
#define BTN_MINUS_HELD (WBTN_ZL_HELD || WBTN_MINUS_HELD || GBTN_MINUS_HELD)
|
||||
#define BTN_PLUS_HELD (WBTN_ZR_HELD || WBTN_PLUS_HELD || GBTN_PLUS_HELD)
|
||||
#define BTN_HOME_HELD (WBTN_HOME_HELD || GBTN_HOME_HELD)
|
||||
#define BTN_HOME_HELD (WBTN_HOME_HELD || GBTN_START_HELD)
|
||||
#define BTN_MINUS_HELD (WBTN_MINUS_HELD || GBTN_L_HELD)
|
||||
#define BTN_PLUS_HELD (WBTN_PLUS_HELD || GBTN_R_HELD)
|
||||
#define BTN_A_HELD (WBTN_A_HELD || GBTN_A_HELD)
|
||||
#define BTN_B_HELD (WBTN_B_HELD || GBTN_B_HELD)
|
||||
#define BTN_1_HELD (WBTN_1_HELD || GBTN_1_HELD)
|
||||
@ -139,7 +133,6 @@
|
||||
#define RIGHT_STICK_ANG_DOWN (right_stick_angle[chan] >= 120 && right_stick_angle[chan] <= 240)
|
||||
#define RIGHT_STICK_ANG_LEFT (right_stick_angle[chan] >= 210 && right_stick_angle[chan] <= 330)
|
||||
|
||||
|
||||
/*
|
||||
//Button values reference//
|
||||
WPAD_BUTTON_2 0x0001
|
||||
|
@ -120,10 +120,10 @@ int BootHomebrew(bool wiiflow_stub)
|
||||
|
||||
if(wiiflow_stub)
|
||||
{
|
||||
/* Clear low mem - the hard way :P */
|
||||
memset((void*)0x80000000, 0, 0x4000);
|
||||
/* Clear potential homebrew channel stub */
|
||||
memset((void*)0x80001800, 0, 0x1800);
|
||||
|
||||
/* Copy stub into memory */
|
||||
/* Copy our own stub into memory */
|
||||
memcpy((void*)0x80001800, stub_bin, stub_bin_size);
|
||||
DCFlushRange((void*)0x80001800, stub_bin_size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user