diff options
| author | 2021-01-10 08:36:31 -0600 | |
|---|---|---|
| committer | 2021-01-15 09:05:17 -0600 | |
| commit | b483f2d010bf745ab873e8f8bfaca5515e56d39f (patch) | |
| tree | d14bc19b4ca1c60460a941db612195be12f16b0d /src/core/frontend/emu_window.cpp | |
| parent | Add mutitouch support for touch screens (diff) | |
| download | yuzu-b483f2d010bf745ab873e8f8bfaca5515e56d39f.tar.gz yuzu-b483f2d010bf745ab873e8f8bfaca5515e56d39f.tar.xz yuzu-b483f2d010bf745ab873e8f8bfaca5515e56d39f.zip | |
Always initialize keyboard input
Diffstat (limited to 'src/core/frontend/emu_window.cpp')
| -rw-r--r-- | src/core/frontend/emu_window.cpp | 5 |
1 files changed, 2 insertions, 3 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: |