Merge pull request #46161 from akien-mga/linux-joypads-udev-fallback
Linux: Fix fallback logic when udev fails creating a context
This commit is contained in:
commit
8870f43d74
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue