mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 09:39:13 +00:00
ControllerEmu: Add support for setting the center of a ReshapableInput
This is useful in far out-of-calibration controllers, such as the Switch Pro controller. This also adds support for configuring the center in the Mapping widget.
This commit is contained in:
parent
d60b0c6b37
commit
49e46c8aff
4 changed files with 112 additions and 19 deletions
|
@ -97,6 +97,9 @@ public:
|
|||
const CalibrationData& GetCalibrationData() const;
|
||||
void SetCalibrationData(CalibrationData data);
|
||||
|
||||
const ReshapeData& GetCenter() const;
|
||||
void SetCenter(ReshapeData center);
|
||||
|
||||
protected:
|
||||
ReshapeData Reshape(ControlState x, ControlState y, ControlState modifier = 0.0);
|
||||
|
||||
|
@ -106,6 +109,7 @@ private:
|
|||
|
||||
CalibrationData m_calibration;
|
||||
SettingValue<double> m_deadzone_setting;
|
||||
ReshapeData m_center;
|
||||
};
|
||||
|
||||
} // namespace ControllerEmu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue