Added back back button to touchpad binding

This commit is contained in:
kalaposfos13 2024-12-02 09:20:53 +01:00
parent 178ee45e89
commit 1d8347e1dd
3 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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;

View File

@ -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<std::string, OrbisPadButtonDataOffset> 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<std::string, AxisMapping> string_to_axis_map = {
{"axis_left_x_plus", {Input::Axis::LeftX, 127}},