diff --git a/src/core/analog_controller.cpp b/src/core/analog_controller.cpp index a090ccd07..0dc316982 100644 --- a/src/core/analog_controller.cpp +++ b/src/core/analog_controller.cpp @@ -481,9 +481,13 @@ u32 AnalogController::StaticGetVibrationMotorCount() Controller::SettingList AnalogController::StaticGetSettings() { - static constexpr std::array settings = { + static constexpr std::array settings = { {{SettingInfo::Type::Boolean, "AutoEnableAnalog", "Enable Analog Mode on Reset", - "Automatically enables analog mode when the console is reset/powered on.", "false"}}}; + "Automatically enables analog mode when the console is reset/powered on.", "false"}, + {SettingInfo::Type::Float, "AxisScale", "Analog Axis Scale", + "Sets the analog stick axis scaling factor. A value between 1.30 and 1.40 is recommended when using recent " + "controllers, e.g. DualShock 4, Xbox One Controller.", + "1.00f", "0.01f", "1.50f", "0.01f"}}}; return SettingList(settings.begin(), settings.end()); } diff --git a/src/frontend-common/common_host_interface.cpp b/src/frontend-common/common_host_interface.cpp index 7d4161cb0..ab13293ad 100644 --- a/src/frontend-common/common_host_interface.cpp +++ b/src/frontend-common/common_host_interface.cpp @@ -1059,7 +1059,8 @@ void CommonHostInterface::UpdateControllerInputMap(SettingsInterface& si) } const float axis_scale = si.GetFloatValue(category, "AxisScale", 1.00f); - m_controller_interface->SetControllerAxisScale(controller_index, axis_scale); + m_controller_interface->SetControllerAxisScale(controller_index, + (ctype == ControllerType::AnalogController) ? axis_scale : 1.00f); const float deadzone_size = si.GetFloatValue(category, "Deadzone", 0.25f); m_controller_interface->SetControllerDeadzone(controller_index, deadzone_size);