#if defined(TARGET_SDL)
#if defined(TARGET_SDL2)
+ case SDL_CONTROLLERDEVICEADDED:
+ case SDL_CONTROLLERDEVICEREMOVED:
case SDL_CONTROLLERAXISMOTION:
case SDL_CONTROLLERBUTTONDOWN:
case SDL_CONTROLLERBUTTONUP:
switch(event->type)
{
#if defined(TARGET_SDL2)
+ case SDL_CONTROLLERDEVICEADDED:
+#if 1
+ Error(ERR_DEBUG, "SDL_CONTROLLERDEVICEADDED: device %d added",
+ event->cdevice.which);
+#endif
+ InitJoysticks();
+ break;
+
+ case SDL_CONTROLLERDEVICEREMOVED:
+#if 1
+ Error(ERR_DEBUG, "SDL_CONTROLLERDEVICEREMOVED: device %d removed",
+ event->cdevice.which);
+#endif
+ InitJoysticks();
+ break;
+
case SDL_CONTROLLERAXISMOTION:
#if 1
Error(ERR_DEBUG, "SDL_CONTROLLERAXISMOTION: device %d, axis %d: %d",