mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
WiimoteEmu/UDrawTablet: Expose mapping for lifted stylus.
This commit is contained in:
@ -48,6 +48,7 @@ UDrawTablet::UDrawTablet() : Extension3rdParty("uDraw", _trans("uDraw GameTablet
|
|||||||
// Touch
|
// Touch
|
||||||
groups.emplace_back(m_touch = new ControllerEmu::Triggers(_trans("Touch")));
|
groups.emplace_back(m_touch = new ControllerEmu::Triggers(_trans("Touch")));
|
||||||
m_touch->AddInput(ControllerEmu::Translate, _trans("Pressure"));
|
m_touch->AddInput(ControllerEmu::Translate, _trans("Pressure"));
|
||||||
|
m_touch->AddInput(ControllerEmu::Translate, _trans("Lift"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDrawTablet::BuildDesiredExtensionState(DesiredExtensionState* target_state)
|
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;
|
constexpr double center_y = (max_y + min_y) / 2.0;
|
||||||
|
|
||||||
// Neutral (lifted) stylus state:
|
// Neutral (lifted) stylus state:
|
||||||
u16 stylus_x = 0x7ff;
|
u16 stylus_x = 0xfff;
|
||||||
u16 stylus_y = 0x7ff;
|
u16 stylus_y = 0xfff;
|
||||||
|
|
||||||
// TODO: Expose the lifted stylus state in the UI.
|
const bool is_stylus_lifted = std::lround(touch_state.data[1]) != 0;
|
||||||
bool is_stylus_lifted = false;
|
|
||||||
|
|
||||||
const auto stylus_state = m_stylus->GetState();
|
const auto stylus_state = m_stylus->GetState();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user