core: hid: Fix native mouse mappings
This commit is contained in:
parent
8f3e2a1b48
commit
9477181d09
5 changed files with 62 additions and 63 deletions
|
@ -65,6 +65,11 @@ void Controller_Gesture::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
|
|||
}
|
||||
|
||||
void Controller_Gesture::ReadTouchInput() {
|
||||
if (!Settings::values.touchscreen.enabled) {
|
||||
fingers = {};
|
||||
return;
|
||||
}
|
||||
|
||||
const auto touch_status = console->GetTouch();
|
||||
for (std::size_t id = 0; id < fingers.size(); ++id) {
|
||||
fingers[id] = touch_status[id];
|
||||
|
|
|
@ -33,10 +33,11 @@ void Controller_Mouse::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
|
|||
return;
|
||||
}
|
||||
|
||||
next_state = {};
|
||||
|
||||
const auto& last_entry = shared_memory->mouse_lifo.ReadCurrentEntry().state;
|
||||
next_state.sampling_number = last_entry.sampling_number + 1;
|
||||
|
||||
next_state.attribute.raw = 0;
|
||||
if (Settings::values.mouse_enabled) {
|
||||
const auto& mouse_button_state = emulated_devices->GetMouseButtons();
|
||||
const auto& mouse_position_state = emulated_devices->GetMousePosition();
|
||||
|
|
|
@ -58,6 +58,11 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin
|
|||
}
|
||||
|
||||
if (!finger.pressed && current_touch.pressed) {
|
||||
// Ignore all touch fingers if disabled
|
||||
if (!Settings::values.touchscreen.enabled) {
|
||||
continue;
|
||||
}
|
||||
|
||||
finger.attribute.start_touch.Assign(1);
|
||||
finger.pressed = true;
|
||||
finger.position = current_touch.position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue