Browse Source

Update macOS controller logic

Correctly implement controller logic checking for macOS.
master
TheoryOfNekomata 1 year ago
parent
commit
99c0bcb9e4
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      src/packages/game/input/IZ_joystick.c

+ 9
- 9
src/packages/game/input/IZ_joystick.c View File

@@ -123,16 +123,16 @@ void IZ_JoystickHandleButtonEvents(IZ_JoystickState* state, IZ_Action* action, S


// TODO test with XInput, make compatible with Apple // TODO test with XInput, make compatible with Apple


if (IZ_MACOS) {
//printf("%d\n", e.jbutton.button);
if (e.jbutton.button == 2) {
normalized_button = 4;
} else if (e.jbutton.button == 6) {
normalized_button = 11;
} else if (e.jbutton.button == 4) {
normalized_button = 10;
}
#ifdef IZ_MACOS
//printf("%d\n", e.jbutton.button);
if (e.jbutton.button == 2) {
normalized_button = 4;
} else if (e.jbutton.button == 6) {
normalized_button = 11;
} else if (e.jbutton.button == 4) {
normalized_button = 10;
} }
#endif


if (normalized_button == state->config.control_mapping[control_index]) { if (normalized_button == state->config.control_mapping[control_index]) {
const u16 bitflag = (0x1 << control_index); const u16 bitflag = (0x1 << control_index);


Loading…
Cancel
Save