summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/touchscreen.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-10-18 13:34:30 +0200
committerZach Hilman <zachhilman@gmail.com>2018-11-19 05:21:33 +0100
commit0c3e7b708684fb17cb29c491fca46125d7d716b9 (patch)
tree2b0d5fa7202464a02dee2cc08e0155e43b2c2691 /src/core/hle/service/hid/controllers/touchscreen.cpp
parentAdded debugpad skeleton (diff)
downloadyuzu-0c3e7b708684fb17cb29c491fca46125d7d716b9.tar
yuzu-0c3e7b708684fb17cb29c491fca46125d7d716b9.tar.gz
yuzu-0c3e7b708684fb17cb29c491fca46125d7d716b9.tar.bz2
yuzu-0c3e7b708684fb17cb29c491fca46125d7d716b9.tar.lz
yuzu-0c3e7b708684fb17cb29c491fca46125d7d716b9.tar.xz
yuzu-0c3e7b708684fb17cb29c491fca46125d7d716b9.tar.zst
yuzu-0c3e7b708684fb17cb29c491fca46125d7d716b9.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers/touchscreen.cpp')
-rw-r--r--src/core/hle/service/hid/controllers/touchscreen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp
index 43efef803..07244fe4e 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.cpp
+++ b/src/core/hle/service/hid/controllers/touchscreen.cpp
@@ -41,7 +41,11 @@ void Controller_Touchscreen::OnUpdate(u8* data, std::size_t size) {
const auto [x, y, pressed] = touch_device->GetStatus();
auto& touch_entry = cur_entry.states[0];
+ touch_entry.attribute.raw = 0;
if (pressed) {
+ if (cur_entry.entry_count == 0) {
+ touch_entry.attribute.start_touch.Assign(1);
+ }
touch_entry.x = static_cast<u16>(x * Layout::ScreenUndocked::Width);
touch_entry.y = static_cast<u16>(y * Layout::ScreenUndocked::Height);
touch_entry.diameter_x = 15;
@@ -53,6 +57,9 @@ void Controller_Touchscreen::OnUpdate(u8* data, std::size_t size) {
touch_entry.finger = 0;
cur_entry.entry_count = 1;
} else {
+ if (cur_entry.entry_count == 1) {
+ touch_entry.attribute.end_touch.Assign(1);
+ }
cur_entry.entry_count = 0;
}