src/joystick/linux/SDL_sysjoystick.c
changeset 10609 d702ecbd8ba7
parent 10595 9da2701eeb4a
child 10617 346c02ff71b6
equal deleted inserted replaced
10608:8661c956c368 10609:d702ecbd8ba7
   280 
   280 
   281     return -1;
   281     return -1;
   282 }
   282 }
   283 #endif
   283 #endif
   284 
   284 
       
   285 #if ! SDL_USE_LIBUDEV
   285 static int
   286 static int
   286 JoystickInitWithoutUdev(void)
   287 JoystickInitWithoutUdev(void)
   287 {
   288 {
   288     int i;
   289     int i;
   289     char path[PATH_MAX];
   290     char path[PATH_MAX];
   296         MaybeAddDevice(path);
   297         MaybeAddDevice(path);
   297     }
   298     }
   298 
   299 
   299     return numjoysticks;
   300     return numjoysticks;
   300 }
   301 }
   301 
   302 #endif
   302 
   303 
   303 #if SDL_USE_LIBUDEV
   304 #if SDL_USE_LIBUDEV
   304 static int
   305 static int
   305 JoystickInitWithUdev(void)
   306 JoystickInitWithUdev(void)
   306 {
   307 {
   340         SDL_free(envcopy);
   341         SDL_free(envcopy);
   341     }
   342     }
   342 
   343 
   343 #if SDL_USE_LIBUDEV
   344 #if SDL_USE_LIBUDEV
   344     return JoystickInitWithUdev();
   345     return JoystickInitWithUdev();
   345 #endif
   346 #else 
   346 
       
   347     return JoystickInitWithoutUdev();
   347     return JoystickInitWithoutUdev();
       
   348 #endif
   348 }
   349 }
   349 
   350 
   350 int SDL_SYS_NumJoysticks()
   351 int SDL_SYS_NumJoysticks()
   351 {
   352 {
   352     return numjoysticks;
   353     return numjoysticks;