From 8dcfb831377b418c5e3699d5d9f437b3dacef283 Mon Sep 17 00:00:00 2001 From: pionere Date: Sun, 1 Oct 2023 07:54:53 +0200 Subject: [PATCH] fix devices in the patcher --- tools/patcher/controls/devices/joystick.cpp | 16 +++++++-------- .../patcher/controls/devices/kbcontroller.cpp | 20 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/patcher/controls/devices/joystick.cpp b/tools/patcher/controls/devices/joystick.cpp index 22dfd8ea486..89936ea2cdd 100644 --- a/tools/patcher/controls/devices/joystick.cpp +++ b/tools/patcher/controls/devices/joystick.cpp @@ -25,19 +25,19 @@ ControllerButton Joystick::ToControllerButton(const SDL_Event& event) switch (event.jbutton.button) { #ifdef JOY_BUTTON_A case JOY_BUTTON_A: - return ControllerButton_BUTTON_A; + return ControllerButton_BUTTON_FACE_BOTTOM; #endif #ifdef JOY_BUTTON_B case JOY_BUTTON_B: - return ControllerButton_BUTTON_B; + return ControllerButton_BUTTON_FACE_RIGHT; #endif #ifdef JOY_BUTTON_X case JOY_BUTTON_X: - return ControllerButton_BUTTON_X; + return ControllerButton_BUTTON_FACE_LEFT; #endif #ifdef JOY_BUTTON_Y case JOY_BUTTON_Y: - return ControllerButton_BUTTON_Y; + return ControllerButton_BUTTON_FACE_TOP; #endif #ifdef JOY_BUTTON_LEFTSTICK case JOY_BUTTON_LEFTSTICK: @@ -118,19 +118,19 @@ int Joystick::ToSdlJoyButton(ControllerButton button) case ControllerButton_IGNORE: break; #ifdef JOY_BUTTON_A - case ControllerButton_BUTTON_A: + case ControllerButton_BUTTON_FACE_BOTTOM: return JOY_BUTTON_A; #endif #ifdef JOY_BUTTON_B - case ControllerButton_BUTTON_B: + case ControllerButton_BUTTON_FACE_RIGHT: return JOY_BUTTON_B; #endif #ifdef JOY_BUTTON_X - case ControllerButton_BUTTON_X: + case ControllerButton_BUTTON_FACE_LEFT: return JOY_BUTTON_X; #endif #ifdef JOY_BUTTON_Y - case ControllerButton_BUTTON_Y: + case ControllerButton_BUTTON_FACE_TOP: return JOY_BUTTON_Y; #endif #ifdef JOY_BUTTON_BACK diff --git a/tools/patcher/controls/devices/kbcontroller.cpp b/tools/patcher/controls/devices/kbcontroller.cpp index ca1de27650f..c3c2044fc7c 100644 --- a/tools/patcher/controls/devices/kbcontroller.cpp +++ b/tools/patcher/controls/devices/kbcontroller.cpp @@ -19,19 +19,19 @@ ControllerButton KbCtrlToControllerButton(const SDL_Event& event) #endif #ifdef KBCTRL_BUTTON_A case KBCTRL_BUTTON_A: - return ControllerButton_BUTTON_A; + return ControllerButton_BUTTON_FACE_BOTTOM; #endif #ifdef KBCTRL_BUTTON_B - case KBCTRL_BUTTON_B: // Right button - return ControllerButton_BUTTON_B; + case KBCTRL_BUTTON_B: + return ControllerButton_BUTTON_FACE_RIGHT; #endif #ifdef KBCTRL_BUTTON_X - case KBCTRL_BUTTON_X: // Left button - return ControllerButton_BUTTON_X; + case KBCTRL_BUTTON_X: + return ControllerButton_BUTTON_FACE_LEFT; #endif #ifdef KBCTRL_BUTTON_Y case KBCTRL_BUTTON_Y: - return ControllerButton_BUTTON_Y; + return ControllerButton_BUTTON_FACE_TOP; #endif #ifdef KBCTRL_BUTTON_LEFTSTICK case KBCTRL_BUTTON_LEFTSTICK: @@ -93,19 +93,19 @@ static SDL_Keycode ControllerButtonToKbCtrlKeyCode(ControllerButton button) { switch (button) { #ifdef KBCTRL_BUTTON_A - case ControllerButton_BUTTON_A: + case ControllerButton_BUTTON_FACE_BOTTOM: return KBCTRL_BUTTON_A; #endif #ifdef KBCTRL_BUTTON_B - case ControllerButton_BUTTON_B: + case ControllerButton_BUTTON_FACE_RIGHT: return KBCTRL_BUTTON_B; #endif #ifdef KBCTRL_BUTTON_X - case ControllerButton_BUTTON_X: + case ControllerButton_BUTTON_FACE_LEFT: return KBCTRL_BUTTON_X; #endif #ifdef KBCTRL_BUTTON_Y - case ControllerButton_BUTTON_Y: + case ControllerButton_BUTTON_FACE_TOP: return KBCTRL_BUTTON_Y; #endif #ifdef KBCTRL_BUTTON_BACK