summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar german772021-04-30 19:28:21 -0500
committerGravatar german772021-04-30 19:28:21 -0500
commit1ed1dd3c894bd765094720da2e8654d2f4e7e603 (patch)
tree9963ce7170bd843b1997fa6fb0730dce8f7e1d2a /src
parentMerge pull request #6257 from Morph1984/fix-use-after-free-webapplet (diff)
downloadyuzu-1ed1dd3c894bd765094720da2e8654d2f4e7e603.tar.gz
yuzu-1ed1dd3c894bd765094720da2e8654d2f4e7e603.tar.xz
yuzu-1ed1dd3c894bd765094720da2e8654d2f4e7e603.zip
Disable touch if setting is not enabled
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/hid/controllers/gesture.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/touchscreen.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp
index 155808f6a..71545bf1f 100644
--- a/src/core/hle/service/hid/controllers/gesture.cpp
+++ b/src/core/hle/service/hid/controllers/gesture.cpp
@@ -33,7 +33,7 @@ void Controller_Gesture::OnUpdate(const Core::Timing::CoreTiming& core_timing, u
33 shared_memory.header.timestamp = core_timing.GetCPUTicks(); 33 shared_memory.header.timestamp = core_timing.GetCPUTicks();
34 shared_memory.header.total_entry_count = 17; 34 shared_memory.header.total_entry_count = 17;
35 35
36 if (!IsControllerActivated()) { 36 if (!IsControllerActivated() || !Settings::values.touchscreen.enabled) {
37 shared_memory.header.entry_count = 0; 37 shared_memory.header.entry_count = 0;
38 shared_memory.header.last_entry_index = 0; 38 shared_memory.header.last_entry_index = 0;
39 return; 39 return;
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp
index b5f8077be..8f56a0255 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
33 shared_memory.header.timestamp = core_timing.GetCPUTicks(); 33 shared_memory.header.timestamp = core_timing.GetCPUTicks();
34 shared_memory.header.total_entry_count = 17; 34 shared_memory.header.total_entry_count = 17;
35 35
36 if (!IsControllerActivated()) { 36 if (!IsControllerActivated() || !Settings::values.touchscreen.enabled) {
37 shared_memory.header.entry_count = 0; 37 shared_memory.header.entry_count = 0;
38 shared_memory.header.last_entry_index = 0; 38 shared_memory.header.last_entry_index = 0;
39 return; 39 return;