Renamed controller input type 'analog' to 'thumbstick'.

This commit is contained in:
Leon Styhre 2021-03-24 21:20:01 +01:00
parent 4ab296d8bb
commit 12a7b18d05
10 changed files with 36 additions and 36 deletions

View file

@ -128,20 +128,20 @@ bool InputConfig::isMappedTo(const std::string& name, Input input)
bool InputConfig::isMappedLike(const std::string& name, Input input) bool InputConfig::isMappedLike(const std::string& name, Input input)
{ {
if (name == "left") { if (name == "left") {
return isMappedTo("left", input) || isMappedTo("leftanalogleft", input) || return isMappedTo("left", input) || isMappedTo("leftthumbstickleft", input) ||
isMappedTo("rightanalogleft", input); isMappedTo("rightthumbstickleft", input);
} }
else if (name == "right") { else if (name == "right") {
return isMappedTo("right", input) || isMappedTo("leftanalogright", input) || return isMappedTo("right", input) || isMappedTo("leftthumbstickright", input) ||
isMappedTo("rightanalogright", input); isMappedTo("rightthumbstickright", input);
} }
else if (name == "up") { else if (name == "up") {
return isMappedTo("up", input) || isMappedTo("leftanalogup", input) || return isMappedTo("up", input) || isMappedTo("leftthumbstickup", input) ||
isMappedTo("rightanalogup", input); isMappedTo("rightthumbstickup", input);
} }
else if (name == "down") { else if (name == "down") {
return isMappedTo("down", input) || isMappedTo("leftanalogdown", input) || return isMappedTo("down", input) || isMappedTo("leftthumbstickdown", input) ||
isMappedTo("rightanalogdown", input); isMappedTo("rightthumbstickdown", input);
} }
else if (name == "leftshoulder") { else if (name == "leftshoulder") {
return isMappedTo("leftshoulder", input) || isMappedTo("pageup", input); return isMappedTo("leftshoulder", input) || isMappedTo("pageup", input);

View file

@ -414,8 +414,8 @@ void InputManager::loadDefaultKBConfig()
cfg->mapInput("lefttrigger", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_HOME, 1, true)); cfg->mapInput("lefttrigger", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_HOME, 1, true));
cfg->mapInput("righttrigger", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_END, 1, true)); cfg->mapInput("righttrigger", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_END, 1, true));
cfg->mapInput("leftanalogclick", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F2, 1, true)); cfg->mapInput("leftthumbstickclick", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F2, 1, true));
cfg->mapInput("rightanalogclick", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F3, 1, true)); cfg->mapInput("rightthumbstickclick", Input(DEVICE_KEYBOARD, TYPE_KEY, SDLK_F3, 1, true));
} }
void InputManager::writeDeviceConfig(InputConfig* config) void InputManager::writeDeviceConfig(InputConfig* config)

View file

@ -26,7 +26,7 @@ static const std::map<std::string, std::string> ICON_PATH_MAP {
{ "up/down", ":/help/dpad_updown.svg" }, { "up/down", ":/help/dpad_updown.svg" },
{ "left/right", ":/help/dpad_leftright.svg" }, { "left/right", ":/help/dpad_leftright.svg" },
{ "up/down/left/right", ":/help/dpad_all.svg" }, { "up/down/left/right", ":/help/dpad_all.svg" },
{ "analogclick", ":/help/analog_click.svg" }, { "thumbstickclick", ":/help/thumbstick_click.svg" },
{ "a", ":/help/button_a.svg" }, { "a", ":/help/button_a.svg" },
{ "b", ":/help/button_b.svg" }, { "b", ":/help/button_b.svg" },
{ "x", ":/help/button_x.svg" }, { "x", ":/help/button_x.svg" },

View file

@ -26,31 +26,31 @@ static const int inputCount = 24;
static const InputConfigStructure GUI_INPUT_CONFIG_LIST[inputCount] = static const InputConfigStructure GUI_INPUT_CONFIG_LIST[inputCount] =
{ {
{ "Up", false, "D-PAD UP", ":/help/dpad_up.svg" }, { "Up", false, "D-PAD UP", ":/help/dpad_up.svg" },
{ "Down", false, "D-PAD DOWN", ":/help/dpad_down.svg" }, { "Down", false, "D-PAD DOWN", ":/help/dpad_down.svg" },
{ "Left", false, "D-PAD LEFT", ":/help/dpad_left.svg" }, { "Left", false, "D-PAD LEFT", ":/help/dpad_left.svg" },
{ "Right", false, "D-PAD RIGHT", ":/help/dpad_right.svg" }, { "Right", false, "D-PAD RIGHT", ":/help/dpad_right.svg" },
{ "Start", true, "START", ":/help/button_start.svg" }, { "Start", true, "START", ":/help/button_start.svg" },
{ "Select", true, "SELECT", ":/help/button_select.svg" }, { "Select", true, "SELECT", ":/help/button_select.svg" },
{ "A", false, "BUTTON A / SOUTH", ":/help/buttons_south_XBOX.svg" }, { "A", false, "BUTTON A / SOUTH", ":/help/buttons_south_XBOX.svg" },
{ "B", true, "BUTTON B / EAST", ":/help/buttons_east_XBOX.svg" }, { "B", true, "BUTTON B / EAST", ":/help/buttons_east_XBOX.svg" },
{ "X", true, "BUTTON X / WEST", ":/help/buttons_west_XBOX.svg" }, { "X", true, "BUTTON X / WEST", ":/help/buttons_west_XBOX.svg" },
{ "Y", true, "BUTTON Y / NORTH", ":/help/buttons_north_XBOX.svg" }, { "Y", true, "BUTTON Y / NORTH", ":/help/buttons_north_XBOX.svg" },
{ "LeftShoulder", true, "LEFT SHOULDER", ":/help/button_l.svg" }, { "LeftShoulder", true, "LEFT SHOULDER", ":/help/button_l.svg" },
{ "RightShoulder", true, "RIGHT SHOULDER", ":/help/button_r.svg" }, { "RightShoulder", true, "RIGHT SHOULDER", ":/help/button_r.svg" },
{ "LeftTrigger", true, "LEFT TRIGGER", ":/help/button_lt.svg" }, { "LeftTrigger", true, "LEFT TRIGGER", ":/help/button_lt.svg" },
{ "RightTrigger", true, "RIGHT TRIGGER", ":/help/button_rt.svg" }, { "RightTrigger", true, "RIGHT TRIGGER", ":/help/button_rt.svg" },
{ "LeftAnalogUp", true, "LEFT ANALOG UP", ":/help/analog_up.svg" }, { "LeftThumbstickUp", true, "LEFT THUMBSTICK UP", ":/help/thumbstick_up.svg" },
{ "LeftAnalogDown", true, "LEFT ANALOG DOWN", ":/help/analog_down.svg" }, { "LeftThumbstickDown", true, "LEFT THUMBSTICK DOWN", ":/help/thumbstick_down.svg" },
{ "LeftAnalogLeft", true, "LEFT ANALOG LEFT", ":/help/analog_left.svg" }, { "LeftThumbstickLeft", true, "LEFT THUMBSTICK LEFT", ":/help/thumbstick_left.svg" },
{ "LeftAnalogRight", true, "LEFT ANALOG RIGHT", ":/help/analog_right.svg" }, { "LeftThumbstickRight", true, "LEFT THUMBSTICK RIGHT", ":/help/thumbstick_right.svg" },
{ "LeftAnalogClick", true, "LEFT ANALOG CLICK", ":/help/analog_click.svg" }, { "LeftThumbstickClick", true, "LEFT THUMBSTICK CLICK", ":/help/thumbstick_click.svg" },
{ "RightAnalogUp", true, "RIGHT ANALOG UP", ":/help/analog_up.svg" }, { "RightThumbstickUp", true, "RIGHT THUMBSTICK UP", ":/help/thumbstick_up.svg" },
{ "RightAnalogDown", true, "RIGHT ANALOG DOWN", ":/help/analog_down.svg" }, { "RightThumbstickDown", true, "RIGHT THUMBSTICK DOWN", ":/help/thumbstick_down.svg" },
{ "RightAnalogLeft", true, "RIGHT ANALOG LEFT", ":/help/analog_left.svg" }, { "RightThumbstickLeft", true, "RIGHT THUMBSTICK LEFT", ":/help/thumbstick_left.svg" },
{ "RightAnalogRight", true, "RIGHT ANALOG RIGHT", ":/help/analog_right.svg" }, { "RightThumbstickRight", true, "RIGHT THUMBSTICK RIGHT", ":/help/thumbstick_right.svg" },
{ "RightAnalogClick", true, "RIGHT ANALOG CLICK", ":/help/analog_click.svg" }, { "RightThumbstickClick", true, "RIGHT THUMBSTICK CLICK", ":/help/thumbstick_click.svg" },
// { "HotKeyEnable", true, "HOTKEY ENABLE", ":/help/button_hotkey.svg" } // { "HotKeyEnable", true, "HOTKEY ENABLE", ":/help/button_hotkey.svg" }
}; };
// MasterVolUp and MasterVolDown are also hooked up, but do not appear on this screen. // MasterVolUp and MasterVolDown are also hooked up, but do not appear on this screen.

View file

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 848 B

View file

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 848 B

View file

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 848 B

View file

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 848 B

View file

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 848 B

View file

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 848 B