From 08d5bd36d83d8ddad7894bb3d5d17c69dc125d18 Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 2 May 2021 21:27:15 -0500 Subject: hid: Fix touch not initializing properly if disabled --- src/core/hle/service/hid/controllers/touchscreen.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/hid/controllers/touchscreen.cpp') diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp index 8f56a0255..55e3cc014 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.cpp +++ b/src/core/hle/service/hid/controllers/touchscreen.cpp @@ -33,7 +33,7 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin shared_memory.header.timestamp = core_timing.GetCPUTicks(); shared_memory.header.total_entry_count = 17; - if (!IsControllerActivated() || !Settings::values.touchscreen.enabled) { + if (!IsControllerActivated()) { shared_memory.header.entry_count = 0; shared_memory.header.last_entry_index = 0; return; @@ -105,6 +105,10 @@ void Controller_Touchscreen::OnLoadInputDevices() { } std::optional Controller_Touchscreen::GetUnusedFingerID() const { + // Dont assign any touch input to a finger if disabled + if (!Settings::values.touchscreen.enabled) { + return std::nullopt; + } std::size_t first_free_id = 0; while (first_free_id < MAX_FINGERS) { if (!fingers[first_free_id].pressed) { -- cgit v1.2.3