InputCommon: Clean up how numeric settings are handled. Add units of measure to UI. Eliminate hidden magic values of the IR cursor.

This commit is contained in:
Jordan Woyak
2019-03-26 19:31:03 -05:00
parent 75e74315e6
commit 5efb717873
55 changed files with 552 additions and 567 deletions

View File

@ -11,6 +11,7 @@
#include "InputCommon/ControlReference/ControlReference.h"
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
namespace ControllerEmu
{
@ -77,16 +78,12 @@ public:
using ReshapeData = Common::DVec2;
enum
{
SETTING_DEADZONE,
SETTING_COUNT,
};
// Angle is in radians and should be non-negative
ControlState GetDeadzoneRadiusAtAngle(double angle) const;
ControlState GetInputRadiusAtAngle(double angle) const;
ControlState GetDeadzonePercentage() const;
virtual ControlState GetGateRadiusAtAngle(double angle) const = 0;
virtual ReshapeData GetReshapableState(bool adjusted) = 0;
virtual ControlState GetDefaultInputRadiusAtAngle(double ang) const;
@ -108,6 +105,7 @@ private:
void SaveConfig(IniFile::Section*, const std::string&, const std::string&) override;
CalibrationData m_calibration;
SettingValue<double> m_deadzone_setting;
};
} // namespace ControllerEmu