mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-25 20:06:17 +00:00
Silence unmapped keybind mappings and add XBox paddles (#3121)
This commit is contained in:
parent
e389d03601
commit
6d65ea7314
2 changed files with 11 additions and 2 deletions
|
@ -32,6 +32,8 @@
|
||||||
|
|
||||||
#define KEY_TOGGLE 0x00200000
|
#define KEY_TOGGLE 0x00200000
|
||||||
|
|
||||||
|
#define SDL_UNMAPPED UINT32_MAX - 1
|
||||||
|
|
||||||
namespace Input {
|
namespace Input {
|
||||||
using Input::Axis;
|
using Input::Axis;
|
||||||
using Libraries::Pad::OrbisPadButtonDataOffset;
|
using Libraries::Pad::OrbisPadButtonDataOffset;
|
||||||
|
@ -102,6 +104,10 @@ const std::map<std::string, u32> string_to_cbutton_map = {
|
||||||
|
|
||||||
// this is only for input
|
// this is only for input
|
||||||
{"back", SDL_GAMEPAD_BUTTON_BACK},
|
{"back", SDL_GAMEPAD_BUTTON_BACK},
|
||||||
|
{"lpaddle_high", SDL_GAMEPAD_BUTTON_LEFT_PADDLE1},
|
||||||
|
{"lpaddle_low", SDL_GAMEPAD_BUTTON_LEFT_PADDLE2},
|
||||||
|
{"rpaddle_high", SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1},
|
||||||
|
{"rpaddle_low", SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2},
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::map<std::string, AxisMapping> string_to_axis_map = {
|
const std::map<std::string, AxisMapping> string_to_axis_map = {
|
||||||
|
@ -225,6 +231,7 @@ const std::map<std::string, u32> string_to_keyboard_key_map = {
|
||||||
{"kpenter", SDLK_KP_ENTER},
|
{"kpenter", SDLK_KP_ENTER},
|
||||||
{"kpequals", SDLK_KP_EQUALS},
|
{"kpequals", SDLK_KP_EQUALS},
|
||||||
{"capslock", SDLK_CAPSLOCK},
|
{"capslock", SDLK_CAPSLOCK},
|
||||||
|
{"unmapped", SDL_UNMAPPED},
|
||||||
};
|
};
|
||||||
|
|
||||||
void ParseInputConfig(const std::string game_id);
|
void ParseInputConfig(const std::string game_id);
|
||||||
|
|
|
@ -129,8 +129,10 @@ Controller:
|
||||||
If you have a controller that has different names for buttons, it will still work, just look up what are the equivalent names for that controller
|
If you have a controller that has different names for buttons, it will still work, just look up what are the equivalent names for that controller
|
||||||
The same left-right rule still applies here.
|
The same left-right rule still applies here.
|
||||||
Buttons:
|
Buttons:
|
||||||
'triangle', 'circle', 'cross', 'square', 'l1', 'l3',
|
'triangle', 'circle', 'cross', 'square', 'l1', 'l3',
|
||||||
'options', touchpad', 'up', 'down', 'left', 'right'
|
'options', touchpad', 'up', 'down', 'left', 'right'
|
||||||
|
Input-only:
|
||||||
|
'lpaddle_low', 'lpaddle_high'
|
||||||
Axes if you bind them to a button input:
|
Axes if you bind them to a button input:
|
||||||
'axis_left_x_plus', 'axis_left_x_minus', 'axis_left_y_plus', 'axis_left_y_minus',
|
'axis_left_x_plus', 'axis_left_x_minus', 'axis_left_y_plus', 'axis_left_y_minus',
|
||||||
'axis_right_x_plus', ..., 'axis_right_y_minus',
|
'axis_right_x_plus', ..., 'axis_right_y_minus',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue