소스 검색

Fixed Linux not configured with inotify.

Added code change note.
Brucey 3 년 전
부모
커밋
0f662516af
2개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      sdl.mod/SDL/src/joystick/linux/SDL_sysjoystick.c
  2. 4 0
      sdl.mod/sdl.bmx

+ 6 - 0
sdl.mod/SDL/src/joystick/linux/SDL_sysjoystick.c

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

+ 4 - 0
sdl.mod/sdl.bmx

@@ -114,6 +114,10 @@ Import "include/haikux64/*.h"
 '       SDL/src/thread/SDL_thread.c
 '          Added thread register/unregister.
 '
+'       SDL/src/joystick/linux/SDL_sysjoystick.c
+'          Wrapped some uses of joystick Node in HAVE_INOTIFY ifdefs.
+'
+'
 '
 Import "-limm32"
 Import "-lole32"