ControllerEmu::Cursor: Add input radius/shape settings to IR Cursor mappings to allow use of round inputs in absolute mode. Make relative input option obey the center/width/height settings. Make the mapping indicator pretty and actually show what the relative/center/w/h settings are doing.

This commit is contained in:
Jordan Woyak
2018-12-30 09:10:32 -06:00
parent 247fa8c628
commit 7a00f55cfa
10 changed files with 292 additions and 211 deletions

View File

@ -15,6 +15,8 @@ namespace ControllerEmu
class Tilt : public ReshapableInput
{
public:
typedef ReshapeData StateData;
enum
{
SETTING_MAX_ANGLE = ReshapableInput::SETTING_COUNT,
@ -22,14 +24,17 @@ public:
explicit Tilt(const std::string& name);
StateData GetState(bool adjusted = true);
StateData GetReshapableState(bool adjusted) final override;
ControlState GetGateRadiusAtAngle(double ang) const override;
StateData GetState();
private:
typedef std::chrono::steady_clock Clock;
static constexpr int MAX_DEG_PER_SEC = 360 * 6;
StateData m_tilt;
typedef std::chrono::steady_clock Clock;
Clock::time_point m_last_update;
};
} // namespace ControllerEmu