mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
device: never use inotify_init1(), it is not in older kernels
This commit is contained in:
parent
09bd662919
commit
77f33f3642
@ -32,12 +32,8 @@
|
|||||||
LinuxInputDeviceManager::
|
LinuxInputDeviceManager::
|
||||||
LinuxInputDeviceManager() {
|
LinuxInputDeviceManager() {
|
||||||
// Use inotify to watch /dev/input for hotplugging of devices.
|
// Use inotify to watch /dev/input for hotplugging of devices.
|
||||||
#if !defined(__ANDROID_API__) || __ANDROID_API__ >= 21
|
|
||||||
_inotify_fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
|
|
||||||
#else
|
|
||||||
_inotify_fd = inotify_init();
|
_inotify_fd = inotify_init();
|
||||||
fcntl(_inotify_fd, O_NONBLOCK | O_CLOEXEC);
|
fcntl(_inotify_fd, O_NONBLOCK | O_CLOEXEC);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (_inotify_fd < 0) {
|
if (_inotify_fd < 0) {
|
||||||
device_cat.error()
|
device_cat.error()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user