Allow Android haptics to work when SDL is reinitialized (thanks Rachel!)
authorSam Lantinga <slouken@libsdl.org>
Thu, 11 Oct 2018 15:14:48 -0700
changeset 1231906e89f1159f9
parent 12318 69ebb2ebced0
child 12320 758d4e1222a7
Allow Android haptics to work when SDL is reinitialized (thanks Rachel!)
src/haptic/android/SDL_syshaptic.c
     1.1 --- a/src/haptic/android/SDL_syshaptic.c	Fri Oct 12 01:03:40 2018 +0300
     1.2 +++ b/src/haptic/android/SDL_syshaptic.c	Thu Oct 11 15:14:48 2018 -0700
     1.3 @@ -195,6 +195,10 @@
     1.4  void
     1.5  SDL_SYS_HapticQuit(void)
     1.6  {
     1.7 +/* We don't have any way to scan for joysticks (and their vibrators) at init, so don't wipe the list
     1.8 + * of joysticks here in case this is a reinit.
     1.9 + */
    1.10 +#if 0
    1.11      SDL_hapticlist_item *item = NULL;
    1.12      SDL_hapticlist_item *next = NULL;
    1.13  
    1.14 @@ -206,6 +210,7 @@
    1.15      SDL_hapticlist = SDL_hapticlist_tail = NULL;
    1.16      numhaptics = 0;
    1.17      return;
    1.18 +#endif
    1.19  }
    1.20  
    1.21