mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-25 11:56:18 +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 SDL_UNMAPPED UINT32_MAX - 1
|
||||
|
||||
namespace Input {
|
||||
using Input::Axis;
|
||||
using Libraries::Pad::OrbisPadButtonDataOffset;
|
||||
|
@ -102,6 +104,10 @@ const std::map<std::string, u32> string_to_cbutton_map = {
|
|||
|
||||
// this is only for input
|
||||
{"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 = {
|
||||
|
@ -225,6 +231,7 @@ const std::map<std::string, u32> string_to_keyboard_key_map = {
|
|||
{"kpenter", SDLK_KP_ENTER},
|
||||
{"kpequals", SDLK_KP_EQUALS},
|
||||
{"capslock", SDLK_CAPSLOCK},
|
||||
{"unmapped", SDL_UNMAPPED},
|
||||
};
|
||||
|
||||
void ParseInputConfig(const std::string game_id);
|
||||
|
|
|
@ -131,6 +131,8 @@ Controller:
|
|||
Buttons:
|
||||
'triangle', 'circle', 'cross', 'square', 'l1', 'l3',
|
||||
'options', touchpad', 'up', 'down', 'left', 'right'
|
||||
Input-only:
|
||||
'lpaddle_low', 'lpaddle_high'
|
||||
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_right_x_plus', ..., 'axis_right_y_minus',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue