Skip to content

Commit

Permalink
More explicit button naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
L-P committed Aug 18, 2020
1 parent 63655a2 commit 265d2f3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions wii-u-gc-adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@

const int BUTTON_OFFSET_VALUES[16] = {
BTN_START,
BTN_TR2,
BTN_Z,
BTN_TR,
BTN_TL,
-1,
-1,
-1,
-1,
BTN_SOUTH,
BTN_WEST,
BTN_EAST,
BTN_NORTH,
BTN_B,
BTN_Y,
BTN_X,
BTN_A,
BTN_DPAD_LEFT,
BTN_DPAD_RIGHT,
BTN_DPAD_DOWN,
Expand Down Expand Up @@ -124,18 +124,18 @@ static bool uinput_create(int i, struct ports *port, unsigned char type)

// buttons
ioctl(port->uinput, UI_SET_EVBIT, EV_KEY);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_NORTH);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_SOUTH);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_EAST);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_WEST);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_A);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_B);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_X);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_Y);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_START);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_DPAD_UP);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_DPAD_DOWN);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_DPAD_LEFT);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_DPAD_RIGHT);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_TL);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_TR);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_TR2);
ioctl(port->uinput, UI_SET_KEYBIT, BTN_Z);

// axis
ioctl(port->uinput, UI_SET_EVBIT, EV_ABS);
Expand Down

0 comments on commit 265d2f3

Please sign in to comment.