Linux: Fix fallback logic when udev fails creating a context
Thanks to Noshyaar for pointing out the bug.
This commit is contained in:
parent
9d84e3b395
commit
e26a1f807b
|
@ -105,11 +105,13 @@ void JoypadLinux::run_joypad_thread() {
|
||||||
udev *_udev = udev_new();
|
udev *_udev = udev_new();
|
||||||
if (!_udev) {
|
if (!_udev) {
|
||||||
use_udev = false;
|
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 {
|
} else {
|
||||||
monitor_joypads();
|
monitor_joypads();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue