diff options
Diffstat (limited to 'src/input_common/mouse/mouse_input.h')
| -rw-r--r-- | src/input_common/mouse/mouse_input.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_common/mouse/mouse_input.h b/src/input_common/mouse/mouse_input.h index 5a971ad67..c8bae99c1 100644 --- a/src/input_common/mouse/mouse_input.h +++ b/src/input_common/mouse/mouse_input.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <mutex> | 8 | #include <mutex> |
| 9 | #include <stop_token> | ||
| 9 | #include <thread> | 10 | #include <thread> |
| 10 | 11 | ||
| 11 | #include "common/common_types.h" | 12 | #include "common/common_types.h" |
| @@ -85,7 +86,7 @@ public: | |||
| 85 | [[nodiscard]] const MouseData& GetMouseState(std::size_t button) const; | 86 | [[nodiscard]] const MouseData& GetMouseState(std::size_t button) const; |
| 86 | 87 | ||
| 87 | private: | 88 | private: |
| 88 | void UpdateThread(); | 89 | void UpdateThread(std::stop_token stop_token); |
| 89 | void UpdateYuzuSettings(); | 90 | void UpdateYuzuSettings(); |
| 90 | void StopPanning(); | 91 | void StopPanning(); |
| 91 | 92 | ||
| @@ -105,12 +106,11 @@ private: | |||
| 105 | u16 buttons{}; | 106 | u16 buttons{}; |
| 106 | u16 toggle_buttons{}; | 107 | u16 toggle_buttons{}; |
| 107 | u16 lock_buttons{}; | 108 | u16 lock_buttons{}; |
| 108 | std::thread update_thread; | 109 | std::jthread update_thread; |
| 109 | MouseButton last_button{MouseButton::Undefined}; | 110 | MouseButton last_button{MouseButton::Undefined}; |
| 110 | std::array<MouseInfo, 7> mouse_info; | 111 | std::array<MouseInfo, 7> mouse_info; |
| 111 | Common::SPSCQueue<MouseStatus> mouse_queue; | 112 | Common::SPSCQueue<MouseStatus> mouse_queue; |
| 112 | bool configuring{false}; | 113 | bool configuring{false}; |
| 113 | bool update_thread_running{true}; | ||
| 114 | int mouse_panning_timout{}; | 114 | int mouse_panning_timout{}; |
| 115 | }; | 115 | }; |
| 116 | } // namespace MouseInput | 116 | } // namespace MouseInput |