mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Add a recenter control for Wiimote IR relative input
This adds a recenter control binding which allows recentering the cursor when relative input is enabled. (EnableSettingControl is renamed to avoid confusions.)
This commit is contained in:
@ -434,6 +434,13 @@ public:
|
||||
m_x = MathUtil::Clamp(m_x + xx * SPEED_MULTIPLIER, -1.0, 1.0);
|
||||
if (std::abs(yy) > deadzone)
|
||||
m_y = MathUtil::Clamp(m_y + yy * SPEED_MULTIPLIER, -1.0, 1.0);
|
||||
|
||||
// recenter
|
||||
if (controls[7]->control_ref->State() > 0.5)
|
||||
{
|
||||
m_x = 0.0;
|
||||
m_y = 0.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user