summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-07-18 22:33:11 +0200
committerZach Hilman <zachhilman@gmail.com>2018-07-18 22:33:11 +0200
commitc337272ca9a935d3b1bb99fac2182c8ff84a9597 (patch)
tree949bfdc854d7c8874af2e24bab5a0cfc042b9037 /src/core/hle/service/hid
parentSingle touch support (diff)
downloadyuzu-c337272ca9a935d3b1bb99fac2182c8ff84a9597.tar
yuzu-c337272ca9a935d3b1bb99fac2182c8ff84a9597.tar.gz
yuzu-c337272ca9a935d3b1bb99fac2182c8ff84a9597.tar.bz2
yuzu-c337272ca9a935d3b1bb99fac2182c8ff84a9597.tar.lz
yuzu-c337272ca9a935d3b1bb99fac2182c8ff84a9597.tar.xz
yuzu-c337272ca9a935d3b1bb99fac2182c8ff84a9597.tar.zst
yuzu-c337272ca9a935d3b1bb99fac2182c8ff84a9597.zip
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r--src/core/hle/service/hid/hid.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 32c781cf3..4f18c0fd3 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -166,13 +166,18 @@ private:
touchscreen.entries[curr_entry].header.timestamp = sample_counter;
TouchScreenEntryTouch touch_entry{};
- float x;
- float y;
- bool pressed;
- std::tie(x, y, pressed) = touch_device->GetStatus();
+ auto [x, y, pressed] = touch_device->GetStatus();
+ touch_entry.timestamp = timestamp;
touch_entry.x = static_cast<u16>(x * Layout::ScreenUndocked::Width);
touch_entry.y = static_cast<u16>(y * Layout::ScreenUndocked::Height);
+ touch_entry.touch_index = 0;
+ // TODO(DarkLordZach): Maybe try to derive these from EmuWindow?
+ touch_entry.diameter_x = 15;
+ touch_entry.diameter_y = 15;
+ touch_entry.angle = 0;
+
+ // TODO(DarkLordZach): Implement multi-touch support
if (pressed) {
touchscreen.entries[curr_entry].header.num_touches = 1;
touchscreen.entries[curr_entry].touches[0] = touch_entry;