diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-18 11:30:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 11:30:12 +0100 |
commit | 8870f43d742e0c48ae543d999856f5989170b62d (patch) | |
tree | 7164c59facb524cee23b5d3be49b9fbd502cb480 | |
parent | 65a75dc5f4d8be091c0aed47ca879dcb11fb5c27 (diff) | |
parent | e26a1f807b93d32be0299614ea79cce40a86130e (diff) |
Merge pull request #46161 from akien-mga/linux-joypads-udev-fallback
Linux: Fix fallback logic when udev fails creating a context
-rw-r--r-- | platform/linuxbsd/joypad_linux.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp index d1115b146b..9d2a768fb3 100644 --- a/platform/linuxbsd/joypad_linux.cpp +++ b/platform/linuxbsd/joypad_linux.cpp @@ -105,11 +105,13 @@ void JoypadLinux::run_joypad_thread() { udev *_udev = udev_new(); if (!_udev) { use_udev = false; - ERR_FAIL_MSG("Failed getting an udev context, falling back to parsing /dev/input."); + ERR_PRINT("Failed getting an udev context, falling back to parsing /dev/input."); + monitor_joypads(); + } else { + enumerate_joypads(_udev); + monitor_joypads(_udev); + udev_unref(_udev); } - enumerate_joypads(_udev); - monitor_joypads(_udev); - udev_unref(_udev); } else { monitor_joypads(); } |