|
@@ -269,6 +269,7 @@ static void joystick_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_clas
|
|
if (!(udev_class & SDL_UDEV_DEVICE_JOYSTICK)) {
|
|
if (!(udev_class & SDL_UDEV_DEVICE_JOYSTICK)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+#ifdef HAVE_INOTIFY
|
|
if (SDL_classic_joysticks) {
|
|
if (SDL_classic_joysticks) {
|
|
if (!IsJoystickJSNode(devpath)) {
|
|
if (!IsJoystickJSNode(devpath)) {
|
|
return;
|
|
return;
|
|
@@ -278,6 +279,7 @@ static void joystick_udev_callback(SDL_UDEV_deviceevent udev_type, int udev_clas
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
MaybeAddDevice(devpath);
|
|
MaybeAddDevice(devpath);
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -612,7 +614,11 @@ LINUX_InotifyJoystickDetect(void)
|
|
static int
|
|
static int
|
|
filter_entries(const struct dirent *entry)
|
|
filter_entries(const struct dirent *entry)
|
|
{
|
|
{
|
|
|
|
+#ifdef HAVE_INOTIFY
|
|
return IsJoystickDeviceNode(entry->d_name);
|
|
return IsJoystickDeviceNode(entry->d_name);
|
|
|
|
+#else
|
|
|
|
+ return 0;
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
static int
|
|
static int
|
|
sort_entries(const struct dirent **a, const struct dirent **b)
|
|
sort_entries(const struct dirent **a, const struct dirent **b)
|