HW/GCPadEmu: Adjust gate radius values to more closely match the real hardware.

This commit is contained in:
Jordan Woyak 2020-07-19 09:40:46 -05:00
parent 487cd7abd9
commit ae44f17667
2 changed files with 5 additions and 8 deletions

View File

@ -64,14 +64,10 @@ GCPad::GCPad(const unsigned int index) : m_index(index)
} }
// sticks // sticks
constexpr auto main_gate_radius =
ControlState(MAIN_STICK_GATE_RADIUS) / GCPadStatus::MAIN_STICK_RADIUS;
groups.emplace_back(m_main_stick = new ControllerEmu::OctagonAnalogStick( groups.emplace_back(m_main_stick = new ControllerEmu::OctagonAnalogStick(
"Main Stick", _trans("Control Stick"), main_gate_radius)); "Main Stick", _trans("Control Stick"), MAIN_STICK_GATE_RADIUS));
constexpr auto c_gate_radius = ControlState(C_STICK_GATE_RADIUS) / GCPadStatus::C_STICK_RADIUS;
groups.emplace_back(m_c_stick = new ControllerEmu::OctagonAnalogStick( groups.emplace_back(m_c_stick = new ControllerEmu::OctagonAnalogStick(
"C-Stick", _trans("C Stick"), c_gate_radius)); "C-Stick", _trans("C Stick"), C_STICK_GATE_RADIUS));
// triggers // triggers
groups.emplace_back(m_triggers = new ControllerEmu::MixedTriggers(_trans("Triggers"))); groups.emplace_back(m_triggers = new ControllerEmu::MixedTriggers(_trans("Triggers")));

View File

@ -46,8 +46,9 @@ public:
void LoadDefaults(const ControllerInterface& ciface) override; void LoadDefaults(const ControllerInterface& ciface) override;
static const u8 MAIN_STICK_GATE_RADIUS = 87; // Values averaged from multiple genuine GameCube controllers.
static const u8 C_STICK_GATE_RADIUS = 74; static constexpr ControlState MAIN_STICK_GATE_RADIUS = 0.7937125;
static constexpr ControlState C_STICK_GATE_RADIUS = 0.7221375;
private: private:
ControllerEmu::Buttons* m_buttons; ControllerEmu::Buttons* m_buttons;