mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-02-16 19:05:39 +00:00
AnalogController: Clarify option for forcing analog mode
This commit is contained in:
parent
90997d4a8b
commit
8716c33f41
|
@ -30,7 +30,7 @@ void AnalogController::Reset()
|
||||||
|
|
||||||
ResetRumbleConfig();
|
ResetRumbleConfig();
|
||||||
|
|
||||||
if (m_auto_enable_analog)
|
if (m_force_analog_on_reset)
|
||||||
SetAnalogMode(true);
|
SetAnalogMode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,8 +679,9 @@ u32 AnalogController::StaticGetVibrationMotorCount()
|
||||||
Controller::SettingList AnalogController::StaticGetSettings()
|
Controller::SettingList AnalogController::StaticGetSettings()
|
||||||
{
|
{
|
||||||
static constexpr std::array<SettingInfo, 4> settings = {
|
static constexpr std::array<SettingInfo, 4> settings = {
|
||||||
{{SettingInfo::Type::Boolean, "AutoEnableAnalog", TRANSLATABLE("AnalogController", "Enable Analog Mode on Reset"),
|
{{SettingInfo::Type::Boolean, "ForceAnalogOnReset", TRANSLATABLE("AnalogController", "Force Analog Mode on Reset"),
|
||||||
TRANSLATABLE("AnalogController", "Automatically enables analog mode when the console is reset/powered on."),
|
TRANSLATABLE("AnalogController", "Forces the controller to analog mode when the console is reset/powered on. May "
|
||||||
|
"cause issues with games, so it is recommended to leave this option off."),
|
||||||
"false"},
|
"false"},
|
||||||
{SettingInfo::Type::Boolean, "AnalogDPadInDigitalMode",
|
{SettingInfo::Type::Boolean, "AnalogDPadInDigitalMode",
|
||||||
TRANSLATABLE("AnalogController", "Use Analog Sticks for D-Pad in Digital Mode"),
|
TRANSLATABLE("AnalogController", "Use Analog Sticks for D-Pad in Digital Mode"),
|
||||||
|
@ -704,7 +705,7 @@ Controller::SettingList AnalogController::StaticGetSettings()
|
||||||
void AnalogController::LoadSettings(const char* section)
|
void AnalogController::LoadSettings(const char* section)
|
||||||
{
|
{
|
||||||
Controller::LoadSettings(section);
|
Controller::LoadSettings(section);
|
||||||
m_auto_enable_analog = g_host_interface->GetBoolSettingValue(section, "AutoEnableAnalog", false);
|
m_force_analog_on_reset = g_host_interface->GetBoolSettingValue(section, "ForceAnalogOnReset", false);
|
||||||
m_analog_dpad_in_digital_mode = g_host_interface->GetBoolSettingValue(section, "AnalogDPadInDigitalMode", false);
|
m_analog_dpad_in_digital_mode = g_host_interface->GetBoolSettingValue(section, "AnalogDPadInDigitalMode", false);
|
||||||
m_axis_scale =
|
m_axis_scale =
|
||||||
std::clamp(std::abs(g_host_interface->GetFloatSettingValue(section, "AxisScale", 1.00f)), 0.01f, 1.50f);
|
std::clamp(std::abs(g_host_interface->GetFloatSettingValue(section, "AxisScale", 1.00f)), 0.01f, 1.50f);
|
||||||
|
|
|
@ -144,7 +144,7 @@ private:
|
||||||
|
|
||||||
u32 m_index;
|
u32 m_index;
|
||||||
|
|
||||||
bool m_auto_enable_analog = false;
|
bool m_force_analog_on_reset = false;
|
||||||
bool m_analog_dpad_in_digital_mode = false;
|
bool m_analog_dpad_in_digital_mode = false;
|
||||||
float m_axis_scale = 1.00f;
|
float m_axis_scale = 1.00f;
|
||||||
u8 m_rumble_bias = 8;
|
u8 m_rumble_bias = 8;
|
||||||
|
|
|
@ -753,9 +753,10 @@ static std::array<retro_core_option_definition, 49> s_option_definitions = {{
|
||||||
{"PlayStationMouse", "PlayStation Mouse"},
|
{"PlayStationMouse", "PlayStation Mouse"},
|
||||||
{"NeGcon", "NeGcon"}},
|
{"NeGcon", "NeGcon"}},
|
||||||
"DigitalController"},
|
"DigitalController"},
|
||||||
{"duckstation_Controller1.AutoEnableAnalog",
|
{"duckstation_Controller1.ForceAnalogOnReset",
|
||||||
"Controller 1 Auto Analog Mode",
|
"Controller 1 Force Analog Mode on Reset",
|
||||||
"Automatically enables analog mode in supported controllers at start/reset.",
|
"Forces analog mode in Analog Controller (DualShock) at start/reset. May cause issues with some games. Only use "
|
||||||
|
"this option for games that support analog mode but do not automatically enable it themselves.",
|
||||||
{{"true", "Enabled"}, {"false", "Disabled"}},
|
{{"true", "Enabled"}, {"false", "Disabled"}},
|
||||||
"false"},
|
"false"},
|
||||||
{"duckstation_Controller1.AnalogDPadInDigitalMode",
|
{"duckstation_Controller1.AnalogDPadInDigitalMode",
|
||||||
|
@ -778,9 +779,10 @@ static std::array<retro_core_option_definition, 49> s_option_definitions = {{
|
||||||
{"PlayStationMouse", "PlayStation Mouse"},
|
{"PlayStationMouse", "PlayStation Mouse"},
|
||||||
{"NeGcon", "NeGcon"}},
|
{"NeGcon", "NeGcon"}},
|
||||||
"None"},
|
"None"},
|
||||||
{"duckstation_Controller2.AutoEnableAnalog",
|
{"duckstation_Controller2.ForceAnalogOnReset",
|
||||||
"Controller 2 Auto Analog Mode",
|
"Controller 2 Force Analog Mode on Reset",
|
||||||
"Automatically enables analog mode in supported controllers at start/reset.",
|
"Forces analog mode in Analog Controller (DualShock) at start/reset. May cause issues with some games. Only use "
|
||||||
|
"this option for games that support analog mode but do not automatically enable it themselves.",
|
||||||
{{"true", "Enabled"}, {"false", "Disabled"}},
|
{{"true", "Enabled"}, {"false", "Disabled"}},
|
||||||
"false"},
|
"false"},
|
||||||
{"duckstation_Controller2.AnalogDPadInDigitalMode",
|
{"duckstation_Controller2.AnalogDPadInDigitalMode",
|
||||||
|
|
Loading…
Reference in a new issue