mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 09:35:21 +00:00
(Wii) input fixes
This commit is contained in:
parent
1297bf4fd3
commit
1a65439560
@ -244,18 +244,16 @@ static void wii_input_poll(void *data)
|
|||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
|
|
||||||
unsigned pads = PAD_ScanPads();
|
PAD_ScanPads();
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
unsigned wpads = WPAD_ScanPads();
|
WPAD_ScanPads();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (unsigned port = 0; port < MAX_PADS; port++)
|
for (unsigned port = 0; port < MAX_PADS; port++)
|
||||||
{
|
{
|
||||||
uint64_t state = 0;
|
uint64_t state = 0;
|
||||||
if (port < pads)
|
|
||||||
{
|
{
|
||||||
uint16_t down = PAD_ButtonsHeld(port) | PAD_ButtonsDown(port);
|
uint16_t down = PAD_ButtonsHeld(port);
|
||||||
down &= ~PAD_ButtonsUp(port);
|
|
||||||
|
|
||||||
state |= (down & PAD_BUTTON_A) ? WII_GC_A : 0;
|
state |= (down & PAD_BUTTON_A) ? WII_GC_A : 0;
|
||||||
state |= (down & PAD_BUTTON_B) ? WII_GC_B : 0;
|
state |= (down & PAD_BUTTON_B) ? WII_GC_B : 0;
|
||||||
@ -296,10 +294,8 @@ static void wii_input_poll(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
if (port < wpads)
|
|
||||||
{
|
{
|
||||||
uint32_t down = WPAD_ButtonsHeld(port) | WPAD_ButtonsDown(port);
|
uint32_t down = WPAD_ButtonsHeld(port);
|
||||||
down &= ~WPAD_ButtonsUp(port);
|
|
||||||
|
|
||||||
state |= (down & WPAD_BUTTON_A) ? WII_WIIMOTE_A : 0;
|
state |= (down & WPAD_BUTTON_A) ? WII_WIIMOTE_A : 0;
|
||||||
state |= (down & WPAD_BUTTON_B) ? WII_WIIMOTE_B : 0;
|
state |= (down & WPAD_BUTTON_B) ? WII_WIIMOTE_B : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user