summaryrefslogtreecommitdiffstats
path: root/src/input_common/mouse/mouse_input.h
diff options
context:
space:
mode:
authorRodrigo Locatti <rodrigo.locatti@gmail.com>2021-06-22 07:31:39 +0200
committerRodrigo Locatti <rodrigo.locatti@gmail.com>2021-06-22 07:31:39 +0200
commit0a39163a90de377843d4726154a0247caa928fa1 (patch)
tree61f2d71b247c125f9b90fcbc96fd1e6ff00046f5 /src/input_common/mouse/mouse_input.h
parentMerge pull request #6499 from FernandoS27/we-were-on-a-break (diff)
downloadyuzu-0a39163a90de377843d4726154a0247caa928fa1.tar
yuzu-0a39163a90de377843d4726154a0247caa928fa1.tar.gz
yuzu-0a39163a90de377843d4726154a0247caa928fa1.tar.bz2
yuzu-0a39163a90de377843d4726154a0247caa928fa1.tar.lz
yuzu-0a39163a90de377843d4726154a0247caa928fa1.tar.xz
yuzu-0a39163a90de377843d4726154a0247caa928fa1.tar.zst
yuzu-0a39163a90de377843d4726154a0247caa928fa1.zip
Diffstat (limited to 'src/input_common/mouse/mouse_input.h')
-rw-r--r--src/input_common/mouse/mouse_input.h6
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 @@
#include <array>
#include <mutex>
+#include <stop_token>
#include <thread>
#include "common/common_types.h"
@@ -85,7 +86,7 @@ public:
[[nodiscard]] const MouseData& GetMouseState(std::size_t button) const;
private:
- void UpdateThread();
+ void UpdateThread(std::stop_token stop_token);
void UpdateYuzuSettings();
void StopPanning();
@@ -105,12 +106,11 @@ private:
u16 buttons{};
u16 toggle_buttons{};
u16 lock_buttons{};
- std::thread update_thread;
+ std::jthread update_thread;
MouseButton last_button{MouseButton::Undefined};
std::array<MouseInfo, 7> mouse_info;
Common::SPSCQueue<MouseStatus> mouse_queue;
bool configuring{false};
- bool update_thread_running{true};
int mouse_panning_timout{};
};
} // namespace MouseInput