summaryrefslogtreecommitdiff
path: root/src/core/frontend/emu_window.cpp
diff options
context:
space:
mode:
authorGravatar german2021-01-01 12:32:29 -0600
committerGravatar german2021-01-15 09:05:17 -0600
commitd8df9a16bd4f4517b024c17446a94915493d7f3d (patch)
treeaed2de583aa94dd11259bece37e55f4263f07336 /src/core/frontend/emu_window.cpp
parentAllow all touch inputs at the same time and remove config options that are no... (diff)
downloadyuzu-d8df9a16bd4f4517b024c17446a94915493d7f3d.tar.gz
yuzu-d8df9a16bd4f4517b024c17446a94915493d7f3d.tar.xz
yuzu-d8df9a16bd4f4517b024c17446a94915493d7f3d.zip
Allow to return up to 16 touch inputs per engine
Diffstat (limited to 'src/core/frontend/emu_window.cpp')
-rw-r--r--src/core/frontend/emu_window.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp
index 8c1193894..589842917 100644
--- a/src/core/frontend/emu_window.cpp
+++ b/src/core/frontend/emu_window.cpp
@@ -30,12 +30,14 @@ private:
30 class Device : public Input::TouchDevice { 30 class Device : public Input::TouchDevice {
31 public: 31 public:
32 explicit Device(std::weak_ptr<TouchState>&& touch_state) : touch_state(touch_state) {} 32 explicit Device(std::weak_ptr<TouchState>&& touch_state) : touch_state(touch_state) {}
33 std::tuple<float, float, bool> GetStatus() const override { 33 Input::TouchStatus GetStatus() const override {
34 Input::TouchStatus touch_status = {};
34 if (auto state = touch_state.lock()) { 35 if (auto state = touch_state.lock()) {
35 std::lock_guard guard{state->mutex}; 36 std::lock_guard guard{state->mutex};
36 return std::make_tuple(state->touch_x, state->touch_y, state->touch_pressed); 37 touch_status[0] =
38 std::make_tuple(state->touch_x, state->touch_y, state->touch_pressed);
37 } 39 }
38 return std::make_tuple(0.0f, 0.0f, false); 40 return touch_status;
39 } 41 }
40 42
41 private: 43 private: