diff --git a/src/common/config.cpp b/src/common/config.cpp index 8e9fc5c3b..1b5984846 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -793,6 +793,7 @@ pad_left = pad_left pad_right = pad_right options = options +touchpad = back axis_left_x = axis_left_x axis_left_y = axis_left_y diff --git a/src/input/input_handler.cpp b/src/input/input_handler.cpp index d49ed1463..2abd5d7e2 100644 --- a/src/input/input_handler.cpp +++ b/src/input/input_handler.cpp @@ -139,6 +139,8 @@ u32 GetOrbisToSdlButtonKeycode(OrbisPadButtonDataOffset cbutton) { return SDL_GAMEPAD_BUTTON_DPAD_RIGHT; case OrbisPadButtonDataOffset::Options: return SDL_GAMEPAD_BUTTON_START; + case (OrbisPadButtonDataOffset)BACK_BUTTON: + return SDL_GAMEPAD_BUTTON_BACK; default: return ((u32)-1) - 0x10000000; diff --git a/src/input/input_handler.h b/src/input/input_handler.h index ea0859b8a..aa4b6cb53 100644 --- a/src/input/input_handler.h +++ b/src/input/input_handler.h @@ -27,6 +27,7 @@ #define LEFTJOYSTICK_HALFMODE 0x00010000 #define RIGHTJOYSTICK_HALFMODE 0x00020000 +#define BACK_BUTTON 0x00040000 #define KEY_TOGGLE 0x00200000 @@ -59,6 +60,9 @@ const std::map string_to_cbutton_map = { {"touchpad", OrbisPadButtonDataOffset::TouchPad}, {"leftjoystick_halfmode", (OrbisPadButtonDataOffset)LEFTJOYSTICK_HALFMODE}, {"rightjoystick_halfmode", (OrbisPadButtonDataOffset)RIGHTJOYSTICK_HALFMODE}, + + // this is only for input + {"back", (OrbisPadButtonDataOffset)BACK_BUTTON}, }; const std::map string_to_axis_map = { {"axis_left_x_plus", {Input::Axis::LeftX, 127}},