diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-18 19:40:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 19:40:31 +0100 |
commit | 310496a89f583b49217915b9add165d51aea575e (patch) | |
tree | dbd3274dc1208ffe6c4a0ec99be0747f5d2d1cb1 /platform/linuxbsd/joypad_linux.cpp | |
parent | 7eb4e6415d74e3d4dae6ddd12bb0bdb7acf221c0 (diff) | |
parent | 8e128726f0eac1982aa75a005554ee5b556b332e (diff) | |
download | redot-engine-310496a89f583b49217915b9add165d51aea575e.tar.gz |
Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
Diffstat (limited to 'platform/linuxbsd/joypad_linux.cpp')
-rw-r--r-- | platform/linuxbsd/joypad_linux.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp index 9d2a768fb3..fc818a478d 100644 --- a/platform/linuxbsd/joypad_linux.cpp +++ b/platform/linuxbsd/joypad_linux.cpp @@ -87,7 +87,7 @@ JoypadLinux::JoypadLinux(Input *in) { } JoypadLinux::~JoypadLinux() { - exit_monitor = true; + exit_monitor.set(); joy_thread.wait_to_finish(); close_joypad(); } @@ -155,7 +155,7 @@ void JoypadLinux::monitor_joypads(udev *p_udev) { udev_monitor_enable_receiving(mon); int fd = udev_monitor_get_fd(mon); - while (!exit_monitor) { + while (!exit_monitor.is_set()) { fd_set fds; struct timeval tv; int ret; @@ -197,7 +197,7 @@ void JoypadLinux::monitor_joypads(udev *p_udev) { #endif void JoypadLinux::monitor_joypads() { - while (!exit_monitor) { + while (!exit_monitor.is_set()) { { MutexLock lock(joy_mutex); |