From d8df9a16bd4f4517b024c17446a94915493d7f3d Mon Sep 17 00:00:00 2001 From: german Date: Fri, 1 Jan 2021 12:32:29 -0600 Subject: Allow to return up to 16 touch inputs per engine --- src/core/frontend/emu_window.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/frontend/emu_window.cpp') 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: class Device : public Input::TouchDevice { public: explicit Device(std::weak_ptr&& touch_state) : touch_state(touch_state) {} - std::tuple GetStatus() const override { + Input::TouchStatus GetStatus() const override { + Input::TouchStatus touch_status = {}; if (auto state = touch_state.lock()) { std::lock_guard guard{state->mutex}; - return std::make_tuple(state->touch_x, state->touch_y, state->touch_pressed); + touch_status[0] = + std::make_tuple(state->touch_x, state->touch_y, state->touch_pressed); } - return std::make_tuple(0.0f, 0.0f, false); + return touch_status; } private: -- cgit v1.2.3