From b483f2d010bf745ab873e8f8bfaca5515e56d39f Mon Sep 17 00:00:00 2001 From: german Date: Sun, 10 Jan 2021 08:36:31 -0600 Subject: Always initialize keyboard input --- src/core/frontend/emu_window.cpp | 5 ++--- 1 file changed, 2 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 af6c1633a..ee7a58b1c 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&& 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: -- cgit v1.2.3