Wii: Add analog support for menuing
Jeffrey Pfau jeffrey@endrift.com
Fri, 28 Aug 2015 21:42:39 -0700
1 files changed,
14 insertions(+),
0 deletions(-)
jump to
M
src/platform/wii/main.c
→
src/platform/wii/main.c
@@ -382,6 +382,20 @@ u32 ext = 0;
WPAD_Probe(0, &ext); int keys = 0; + int x = PAD_StickX(0); + int y = PAD_StickY(0); + if (x < -0x40) { + keys |= 1 << GUI_INPUT_LEFT; + } + if (x > 0x40) { + keys |= 1 << GUI_INPUT_RIGHT; + } + if (y < -0x40) { + keys |= 1 << GUI_INPUT_DOWN; + } + if (y > 0x40) { + keys |= 1 << GUI_INPUT_UP; + } if ((padkeys & PAD_BUTTON_A) || (wiiPad & WPAD_BUTTON_2) || ((ext == WPAD_EXP_CLASSIC) && (wiiPad & (WPAD_CLASSIC_BUTTON_A | WPAD_CLASSIC_BUTTON_Y)))) { keys |= 1 << GUI_INPUT_SELECT;