Negcon rumble (#3177)

* Implemented NeGcon with rumble. Code is a mix of the existing NeGcon AnalogController modes.

* Fix negcon id reply and analog/digital toggle.

* Implemented NeGcon with rumble. Code is a mix of the existing NeGcon AnalogController modes.

* Fix negcon id reply and analog/digital toggle.

* Update macros

* Code cleanup
This commit is contained in:
Matheus Fraguas
2024-04-16 01:17:00 -03:00
committed by Stenzek
parent 4d8ed49b24
commit 07c012aee5
8 changed files with 944 additions and 4 deletions

View File

@ -1629,7 +1629,7 @@ const char* Settings::GetAudioBackendDisplayName(AudioBackend backend)
}
static constexpr const std::array s_controller_type_names = {
"None", "DigitalController", "AnalogController", "AnalogJoystick", "GunCon", "PlayStationMouse", "NeGcon"};
"None", "DigitalController", "AnalogController", "AnalogJoystick", "GunCon", "PlayStationMouse", "NeGcon", "NeGconRumble"};
static constexpr const std::array s_controller_display_names = {
TRANSLATE_NOOP("ControllerType", "None"),
TRANSLATE_NOOP("ControllerType", "Digital Controller"),
@ -1637,7 +1637,8 @@ static constexpr const std::array s_controller_display_names = {
TRANSLATE_NOOP("ControllerType", "Analog Joystick"),
TRANSLATE_NOOP("ControllerType", "GunCon"),
TRANSLATE_NOOP("ControllerType", "PlayStation Mouse"),
TRANSLATE_NOOP("ControllerType", "NeGcon")};
TRANSLATE_NOOP("ControllerType", "NeGcon"),
TRANSLATE_NOOP("ControllerType", "NeGcon Rumble")};
std::optional<ControllerType> Settings::ParseControllerTypeName(std::string_view str)
{