diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-02-21 19:41:34 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-02-22 02:48:38 +0100 |
commit | 9477181d09518a183c8241af620a1df4f0c839f8 (patch) | |
tree | b98a3e9bafe0a934bc0c42296cb64012fec4a849 /src/core/hle | |
parent | Merge pull request #9847 from german77/timeout (diff) | |
download | yuzu-9477181d09518a183c8241af620a1df4f0c839f8.tar yuzu-9477181d09518a183c8241af620a1df4f0c839f8.tar.gz yuzu-9477181d09518a183c8241af620a1df4f0c839f8.tar.bz2 yuzu-9477181d09518a183c8241af620a1df4f0c839f8.tar.lz yuzu-9477181d09518a183c8241af620a1df4f0c839f8.tar.xz yuzu-9477181d09518a183c8241af620a1df4f0c839f8.tar.zst yuzu-9477181d09518a183c8241af620a1df4f0c839f8.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/hid/controllers/gesture.cpp | 5 | ||||
-rw-r--r-- | src/core/hle/service/hid/controllers/mouse.cpp | 3 | ||||
-rw-r--r-- | src/core/hle/service/hid/controllers/touchscreen.cpp | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp index 32e0708ba..de0090cc5 100644 --- a/src/core/hle/service/hid/controllers/gesture.cpp +++ b/src/core/hle/service/hid/controllers/gesture.cpp @@ -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]; diff --git a/src/core/hle/service/hid/controllers/mouse.cpp b/src/core/hle/service/hid/controllers/mouse.cpp index b11cb438d..0afc66681 100644 --- a/src/core/hle/service/hid/controllers/mouse.cpp +++ b/src/core/hle/service/hid/controllers/mouse.cpp @@ -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(); diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp index 1da8d3eb0..d90a4e732 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.cpp +++ b/src/core/hle/service/hid/controllers/touchscreen.cpp @@ -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; |