mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-14 04:09:08 +01:00
[Wii] fixed analog stick(s) support in menu (regression introduced in latest changes to menu inputs polling)
This commit is contained in:
parent
a7f42b438e
commit
60f2281fc3
Binary file not shown.
Before Width: | Height: | Size: 4.0 MiB After Width: | Height: | Size: 4.0 MiB |
@ -1821,12 +1821,12 @@ void gx_input_UpdateMenu(void)
|
|||||||
hw = data->btns_h & WPAD_BUTTONS_HELD;
|
hw = data->btns_h & WPAD_BUTTONS_HELD;
|
||||||
|
|
||||||
/* WPAD analog sticks (handled as held direction keys) */
|
/* WPAD analog sticks (handled as held direction keys) */
|
||||||
x = wpad_StickX(data, i);
|
x = wpad_StickX(data, 0);
|
||||||
y = wpad_StickY(data, i);
|
y = wpad_StickY(data, 0);
|
||||||
if (x > ANALOG_SENSITIVITY) hw |= PAD_BUTTON_RIGHT;
|
if (x > ANALOG_SENSITIVITY) hp |= PAD_BUTTON_RIGHT;
|
||||||
else if (x < -ANALOG_SENSITIVITY) hw |= PAD_BUTTON_LEFT;
|
else if (x < -ANALOG_SENSITIVITY) hp |= PAD_BUTTON_LEFT;
|
||||||
else if (y > ANALOG_SENSITIVITY) hw |= PAD_BUTTON_UP;
|
else if (y > ANALOG_SENSITIVITY) hp |= PAD_BUTTON_UP;
|
||||||
else if (y < -ANALOG_SENSITIVITY) hw |= PAD_BUTTON_DOWN;
|
else if (y < -ANALOG_SENSITIVITY) hp |= PAD_BUTTON_DOWN;
|
||||||
|
|
||||||
/* Wiimote orientation */
|
/* Wiimote orientation */
|
||||||
WPAD_IR(i, &m_input.ir);
|
WPAD_IR(i, &m_input.ir);
|
||||||
@ -1849,10 +1849,10 @@ void gx_input_UpdateMenu(void)
|
|||||||
hwu = WiiDRC_ButtonsHeld() & WIIU_BUTTONS_HELD;
|
hwu = WiiDRC_ButtonsHeld() & WIIU_BUTTONS_HELD;
|
||||||
x = WiiDRC_lStickX();
|
x = WiiDRC_lStickX();
|
||||||
y = WiiDRC_lStickY();
|
y = WiiDRC_lStickY();
|
||||||
if (x > ANALOG_SENSITIVITY) hwu |= PAD_BUTTON_RIGHT;
|
if (x > ANALOG_SENSITIVITY) hp |= PAD_BUTTON_RIGHT;
|
||||||
else if (x < -ANALOG_SENSITIVITY) hwu |= PAD_BUTTON_LEFT;
|
else if (x < -ANALOG_SENSITIVITY) hp |= PAD_BUTTON_LEFT;
|
||||||
else if (y > ANALOG_SENSITIVITY) hwu |= PAD_BUTTON_UP;
|
else if (y > ANALOG_SENSITIVITY) hp |= PAD_BUTTON_UP;
|
||||||
else if (y < -ANALOG_SENSITIVITY) hwu |= PAD_BUTTON_DOWN;
|
else if (y < -ANALOG_SENSITIVITY) hp |= PAD_BUTTON_DOWN;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user