mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user