瀏覽代碼

Fix: SDL_EVDEV_device_removed does not need UDEV

Gabriel Jacobo 12 年之前
父節點
當前提交
c691de00c5
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/input/evdev/SDL_evdev.c

+ 3 - 3
src/input/evdev/SDL_evdev.c

@@ -55,9 +55,9 @@ static _THIS = NULL;
 
 
 static SDL_Scancode SDL_EVDEV_translate_keycode(int keycode);
 static SDL_Scancode SDL_EVDEV_translate_keycode(int keycode);
 static void SDL_EVDEV_sync_device(SDL_evdevlist_item *item);
 static void SDL_EVDEV_sync_device(SDL_evdevlist_item *item);
+static int SDL_EVDEV_device_removed(const char *devpath);
 
 
 #if SDL_USE_LIBUDEV
 #if SDL_USE_LIBUDEV
-static int SDL_EVDEV_device_removed(const char *devpath);
 static int SDL_EVDEV_device_added(const SDL_UDEV_deviceclass devclass, const char *devpath);
 static int SDL_EVDEV_device_added(const SDL_UDEV_deviceclass devclass, const char *devpath);
 void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_type, SDL_UDEV_deviceclass udev_class, const char *devpath);
 void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_type, SDL_UDEV_deviceclass udev_class, const char *devpath);
 #endif /* SDL_USE_LIBUDEV */
 #endif /* SDL_USE_LIBUDEV */
@@ -615,7 +615,7 @@ SDL_EVDEV_device_added(const SDL_UDEV_deviceclass devclass, const char *devpath)
     
     
     return _this->numdevices++;
     return _this->numdevices++;
 }
 }
-
+#endif /* SDL_USE_LIBUDEV */
 
 
 static int
 static int
 SDL_EVDEV_device_removed(const char *devpath)
 SDL_EVDEV_device_removed(const char *devpath)
@@ -646,7 +646,7 @@ SDL_EVDEV_device_removed(const char *devpath)
 
 
     return -1;
     return -1;
 }
 }
-#endif /* SDL_USE_LIBUDEV */
+
 
 
 #endif /* SDL_INPUT_LINUXEV */
 #endif /* SDL_INPUT_LINUXEV */