mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-11 02:28:51 +00: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:
parent
75e74315e6
commit
5efb717873
55 changed files with 552 additions and 567 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue