You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Linux: Fix fallback logic when udev fails creating a context
Thanks to Noshyaar for pointing out the bug.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user