Skip to content

Commit

Permalink
wiiu/joystick: nunchuck->nunchuk
Browse files Browse the repository at this point in the history
  • Loading branch information
ashquarky committed Sep 6, 2024
1 parent 0d05aae commit 730f00f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/joystick/wiiu/SDL_wiiujoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,14 @@ static void WIIU_JoystickUpdate(SDL_Joystick *joystick)
case WPAD_EXT_NUNCHUK:
case WPAD_EXT_MPLUS_NUNCHUK: {
for(int i = 0; i < joystick->nbuttons; i++)
if ((kpad.trigger | (kpad.nunchuck.trigger << 16)) & nunchuk_button_map[i])
if ((kpad.trigger | (kpad.nunchuk.trigger << 16)) & nunchuk_button_map[i])
SDL_PrivateJoystickButton(joystick, (Uint8)i, SDL_PRESSED);
for(int i = 0; i < joystick->nbuttons; i++)
if ((kpad.release | (kpad.nunchuck.release << 16)) & nunchuk_button_map[i])
if ((kpad.release | (kpad.nunchuk.release << 16)) & nunchuk_button_map[i])
SDL_PrivateJoystickButton(joystick, (Uint8)i, SDL_RELEASED);

x1 = (int16_t) ((kpad.nunchuck.stick.x) * 0x7ff0);
y1 = (int16_t) -((kpad.nunchuck.stick.y) * 0x7ff0);
x1 = (int16_t) ((kpad.nunchuk.stick.x) * 0x7ff0);
y1 = (int16_t) -((kpad.nunchuk.stick.y) * 0x7ff0);
SDL_PrivateJoystickAxis(joystick, 0, x1);
SDL_PrivateJoystickAxis(joystick, 1, y1);
break;
Expand Down

0 comments on commit 730f00f

Please sign in to comment.