aboutsummaryrefslogtreecommitdiff
path: root/src/core/frontend/emu_window.cpp
diff options
context:
space:
mode:
authorgerman <german@thesoftwareartisans.com>2021-01-10 08:36:31 -0600
committergerman <german@thesoftwareartisans.com>2021-01-15 09:05:17 -0600
commitb92717bec6a7b153cf858295ce25d13fb3cefa5f (patch)
treed14bc19b4ca1c60460a941db612195be12f16b0d /src/core/frontend/emu_window.cpp
parentdf1070a73532beca028f4643fbfa4d8bc6dea1e2 (diff)
Always initialize keyboard input
Diffstat (limited to 'src/core/frontend/emu_window.cpp')
-rw-r--r--src/core/frontend/emu_window.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp
index af6c1633a8..ee7a58b1c0 100644
--- a/src/core/frontend/emu_window.cpp
+++ b/src/core/frontend/emu_window.cpp
@@ -28,12 +28,11 @@ private:
public:
explicit Device(std::weak_ptr<TouchState>&& touch_state) : touch_state(touch_state) {}
Input::TouchStatus GetStatus() const override {
- Input::TouchStatus touch_status{};
if (auto state = touch_state.lock()) {
std::lock_guard guard{state->mutex};
- touch_status = state->status;
+ return state->status;
}
- return touch_status;
+ return {};
}
private: