diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-30 11:47:51 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-30 11:47:51 +0200 |
commit | 1dab521f2d4007850418cc3fc51ea363f9118617 (patch) | |
tree | 6babad700234d6eb011da98ff5411213cfdd3f9f /platform/linuxbsd/joypad_linux.cpp | |
parent | 62f134bd7e31232db7050b5c22380b6882137996 (diff) | |
parent | a008896f70b247f727fa433a9ccf49db05b0bd2c (diff) | |
download | redot-engine-1dab521f2d4007850418cc3fc51ea363f9118617.tar.gz |
Merge pull request #92208 from Calinou/linuxbsd-use-nanosleep
Use `OS::delay_usec()` to avoid using deprecated `usleep()` on Linux
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 6e546c4531..3534c1afee 100644 --- a/platform/linuxbsd/joypad_linux.cpp +++ b/platform/linuxbsd/joypad_linux.cpp @@ -225,7 +225,7 @@ void JoypadLinux::monitor_joypads(udev *p_udev) { udev_device_unref(dev); } } - usleep(50000); + OS::get_singleton()->delay_usec(50'000); } udev_monitor_unref(mon); } @@ -250,7 +250,7 @@ void JoypadLinux::monitor_joypads() { } } closedir(input_directory); - usleep(1000000); // 1s + OS::get_singleton()->delay_usec(1'000'000); } } @@ -508,7 +508,7 @@ void JoypadLinux::joypad_events_thread_run() { } } if (no_events) { - usleep(10000); // 10ms + OS::get_singleton()->delay_usec(10'000); } } } |