mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
WiimoteEmu: Implement MotionPlus parameter y0 and other cleanups.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user