src/joystick/linux/SDL_sysjoystick.c
changeset 6910 a3d4fd1ba315
parent 6885 700f1b25f77f
child 6911 c683ff6484b0
equal deleted inserted replaced
6907:a12c142a37cc 6910:a3d4fd1ba315
    43 #include "SDL_sysjoystick_c.h"
    43 #include "SDL_sysjoystick_c.h"
    44 
    44 
    45 /* !!! FIXME: move this somewhere else. */
    45 /* !!! FIXME: move this somewhere else. */
    46 #if !SDL_EVENTS_DISABLED
    46 #if !SDL_EVENTS_DISABLED
    47 #include "../../events/SDL_events_c.h"
    47 #include "../../events/SDL_events_c.h"
       
    48 #endif
       
    49 
       
    50 /* This isn't defined in older Linux kernel headers */
       
    51 #ifndef SYN_DROPPED
       
    52 #define SYN_DROPPED 3
    48 #endif
    53 #endif
    49 
    54 
    50 /*
    55 /*
    51  * !!! FIXME: move all the udev stuff to src/core/linux, so I can reuse it
    56  * !!! FIXME: move all the udev stuff to src/core/linux, so I can reuse it
    52  * !!! FIXME:  for audio hardware disconnects.
    57  * !!! FIXME:  for audio hardware disconnects.
    56 #include "SDL_loadso.h"
    61 #include "SDL_loadso.h"
    57 #include <libudev.h>
    62 #include <libudev.h>
    58 #include <sys/time.h>
    63 #include <sys/time.h>
    59 #include <sys/types.h>
    64 #include <sys/types.h>
    60 #include <unistd.h>
    65 #include <unistd.h>
    61 
       
    62 /* This isn't defined in older Linux kernel headers */
       
    63 #ifndef SYN_DROPPED
       
    64 #define SYN_DROPPED 3
       
    65 #endif
       
    66 
    66 
    67 /* we never link directly to libudev. */
    67 /* we never link directly to libudev. */
    68 /* !!! FIXME: can we generalize this? ALSA, etc, do the same things. */
    68 /* !!! FIXME: can we generalize this? ALSA, etc, do the same things. */
    69 static const char *udev_library = "libudev.so.0";
    69 static const char *udev_library = "libudev.so.0";
    70 static void *udev_handle = NULL;
    70 static void *udev_handle = NULL;