diff options
Diffstat (limited to 'src/core/frontend')
| -rw-r--r-- | src/core/frontend/emu_window.cpp | 5 | ||||
| -rw-r--r-- | src/core/frontend/emu_window.h | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index af6c1633a..ee7a58b1c 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp | |||
| @@ -28,12 +28,11 @@ private: | |||
| 28 | public: | 28 | public: |
| 29 | explicit Device(std::weak_ptr<TouchState>&& touch_state) : touch_state(touch_state) {} | 29 | explicit Device(std::weak_ptr<TouchState>&& touch_state) : touch_state(touch_state) {} |
| 30 | Input::TouchStatus GetStatus() const override { | 30 | Input::TouchStatus GetStatus() const override { |
| 31 | Input::TouchStatus touch_status{}; | ||
| 32 | if (auto state = touch_state.lock()) { | 31 | if (auto state = touch_state.lock()) { |
| 33 | std::lock_guard guard{state->mutex}; | 32 | std::lock_guard guard{state->mutex}; |
| 34 | touch_status = state->status; | 33 | return state->status; |
| 35 | } | 34 | } |
| 36 | return touch_status; | 35 | return {}; |
| 37 | } | 36 | } |
| 38 | 37 | ||
| 39 | private: | 38 | private: |
diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index f8db42ab4..2436c6580 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h | |||
| @@ -117,12 +117,13 @@ public: | |||
| 117 | * Signal that a touch pressed event has occurred (e.g. mouse click pressed) | 117 | * Signal that a touch pressed event has occurred (e.g. mouse click pressed) |
| 118 | * @param framebuffer_x Framebuffer x-coordinate that was pressed | 118 | * @param framebuffer_x Framebuffer x-coordinate that was pressed |
| 119 | * @param framebuffer_y Framebuffer y-coordinate that was pressed | 119 | * @param framebuffer_y Framebuffer y-coordinate that was pressed |
| 120 | * @param id Touch event id | 120 | * @param id Touch event ID |
| 121 | */ | 121 | */ |
| 122 | void TouchPressed(unsigned framebuffer_x, unsigned framebuffer_y, std::size_t id); | 122 | void TouchPressed(unsigned framebuffer_x, unsigned framebuffer_y, std::size_t id); |
| 123 | 123 | ||
| 124 | /** Signal that a touch released event has occurred (e.g. mouse click released) | 124 | /** |
| 125 | *@param id Touch event id | 125 | * Signal that a touch released event has occurred (e.g. mouse click released) |
| 126 | * @param id Touch event ID | ||
| 126 | */ | 127 | */ |
| 127 | void TouchReleased(std::size_t id); | 128 | void TouchReleased(std::size_t id); |
| 128 | 129 | ||
| @@ -130,7 +131,7 @@ public: | |||
| 130 | * Signal that a touch movement event has occurred (e.g. mouse was moved over the emu window) | 131 | * Signal that a touch movement event has occurred (e.g. mouse was moved over the emu window) |
| 131 | * @param framebuffer_x Framebuffer x-coordinate | 132 | * @param framebuffer_x Framebuffer x-coordinate |
| 132 | * @param framebuffer_y Framebuffer y-coordinate | 133 | * @param framebuffer_y Framebuffer y-coordinate |
| 133 | * @param id Touch event id | 134 | * @param id Touch event ID |
| 134 | */ | 135 | */ |
| 135 | void TouchMoved(unsigned framebuffer_x, unsigned framebuffer_y, std::size_t id); | 136 | void TouchMoved(unsigned framebuffer_x, unsigned framebuffer_y, std::size_t id); |
| 136 | 137 | ||