mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Allow emulated wiimote to be tilted 180 degrees in each direction. (was 90)
Fixes issue 3492.
This commit is contained in:
@ -295,6 +295,7 @@ ControllerEmu::Tilt::Tilt(const char* const _name)
|
||||
|
||||
settings.push_back(new Setting(_trans("Dead Zone"), 0, 0, 50));
|
||||
settings.push_back(new Setting(_trans("Circle Stick"), 0));
|
||||
settings.push_back(new Setting(_trans("Angle"), 0.9f, 0, 180));
|
||||
}
|
||||
|
||||
ControllerEmu::Cursor::Cursor(const char* const _name)
|
||||
|
@ -307,6 +307,7 @@ public:
|
||||
|
||||
ControlState deadzone = settings[0]->value;
|
||||
ControlState circle = settings[1]->value;
|
||||
auto const angle = settings[2]->value / 1.8f;
|
||||
ControlState m = controls[4]->control_ref->State();
|
||||
|
||||
// modifier code
|
||||
@ -363,8 +364,8 @@ public:
|
||||
m_tilt[1] = std::max(m_tilt[1] - 0.1f, yy);
|
||||
}
|
||||
|
||||
*y = C(m_tilt[1] * range + base);
|
||||
*x = C(m_tilt[0] * range + base);
|
||||
*y = C(m_tilt[1] * angle * range + base);
|
||||
*x = C(m_tilt[0] * angle * range + base);
|
||||
}
|
||||
private:
|
||||
float m_tilt[2];
|
||||
|
Reference in New Issue
Block a user