HostInterface: Support per-controller-type settings

This commit is contained in:
Connor McLaughlin
2020-07-01 00:33:45 +10:00
parent f3b2953e40
commit 4dc9e10777
17 changed files with 247 additions and 7 deletions

View File

@ -50,6 +50,7 @@ public:
static AxisList StaticGetAxisNames();
static ButtonList StaticGetButtonNames();
static u32 StaticGetVibrationMotorCount();
static SettingList StaticGetSettings();
ControllerType GetType() const override;
std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const override;
@ -70,6 +71,8 @@ public:
u32 GetVibrationMotorCount() const override;
float GetVibrationMotorStrength(u32 motor) override;
void LoadSettings(HostInterface* host_interface, const char* section) override;
private:
using MotorState = std::array<u8, NUM_MOTORS>;
@ -132,6 +135,8 @@ private:
System* m_system;
u32 m_index;
bool m_auto_enable_analog = false;
bool m_analog_mode = false;
bool m_analog_locked = false;
bool m_rumble_unlocked = false;