mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-19 08:50:48 +00:00
WiimoteEmu: Implement MotionPlus parameter y0 and other cleanups.
This commit is contained in:
parent
59e1c83445
commit
4374600367
9 changed files with 298 additions and 205 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
|
@ -153,8 +154,7 @@ Cursor::StateData Cursor::GetState(const bool adjusted)
|
|||
// If auto-hide time is up or hide button is held:
|
||||
if (!m_auto_hide_timer || controls[6]->control_ref->State() > BUTTON_THRESHOLD)
|
||||
{
|
||||
// TODO: Use NaN or something:
|
||||
result.x = 10000;
|
||||
result.x = std::numeric_limits<ControlState>::quiet_NaN();
|
||||
result.y = 0;
|
||||
}
|
||||
|
||||
|
@ -176,4 +176,9 @@ ControlState Cursor::GetVerticalOffset() const
|
|||
return m_vertical_offset_setting.GetValue() / 100;
|
||||
}
|
||||
|
||||
bool Cursor::StateData::IsVisible() const
|
||||
{
|
||||
return !std::isnan(x);
|
||||
}
|
||||
|
||||
} // namespace ControllerEmu
|
||||
|
|
|
@ -20,6 +20,8 @@ public:
|
|||
ControlState x{};
|
||||
ControlState y{};
|
||||
ControlState z{};
|
||||
|
||||
bool IsVisible() const;
|
||||
};
|
||||
|
||||
explicit Cursor(const std::string& name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue