WiimoteEmu/UDrawTablet: Expose mapping for lifted stylus.
This commit is contained in:
parent
e0fba20f1f
commit
ab9fc3f2e4
|
@ -48,6 +48,7 @@ UDrawTablet::UDrawTablet() : Extension3rdParty("uDraw", _trans("uDraw GameTablet
|
|||
// Touch
|
||||
groups.emplace_back(m_touch = new ControllerEmu::Triggers(_trans("Touch")));
|
||||
m_touch->AddInput(ControllerEmu::Translate, _trans("Pressure"));
|
||||
m_touch->AddInput(ControllerEmu::Translate, _trans("Lift"));
|
||||
}
|
||||
|
||||
void UDrawTablet::BuildDesiredExtensionState(DesiredExtensionState* target_state)
|
||||
|
@ -78,11 +79,10 @@ void UDrawTablet::BuildDesiredExtensionState(DesiredExtensionState* target_state
|
|||
constexpr double center_y = (max_y + min_y) / 2.0;
|
||||
|
||||
// Neutral (lifted) stylus state:
|
||||
u16 stylus_x = 0x7ff;
|
||||
u16 stylus_y = 0x7ff;
|
||||
u16 stylus_x = 0xfff;
|
||||
u16 stylus_y = 0xfff;
|
||||
|
||||
// TODO: Expose the lifted stylus state in the UI.
|
||||
bool is_stylus_lifted = false;
|
||||
const bool is_stylus_lifted = std::lround(touch_state.data[1]) != 0;
|
||||
|
||||
const auto stylus_state = m_stylus->GetState();
|
||||
|
||||
|
|
Loading…
Reference in New Issue