test/testhotplug.c
changeset 8165 2b8ba3d53a67
parent 8164 478fbe1f032f
child 8166 d1be9ce49463
     1.1 --- a/test/testhotplug.c	Mon Feb 03 22:52:18 2014 -0500
     1.2 +++ b/test/testhotplug.c	Mon Feb 03 23:01:19 2014 -0500
     1.3 @@ -78,9 +78,13 @@
     1.4                                      haptic = NULL;
     1.5                                  }
     1.6                              } else {
     1.7 -                                SDL_Log("Joy haptic FAILED!\n");
     1.8 +                                SDL_Log("Joy haptic open FAILED!\n");
     1.9                              }
    1.10                          }
    1.11 +                        else
    1.12 +                        {
    1.13 +                            SDL_Log("No haptic found\n");
    1.14 +                        }
    1.15                      }
    1.16                      break;
    1.17                  case SDL_JOYDEVICEREMOVED:
    1.18 @@ -91,6 +95,7 @@
    1.19                          if(haptic)
    1.20                          {
    1.21                              SDL_HapticClose(haptic);
    1.22 +                            haptic = NULL;
    1.23                          }
    1.24                          SDL_JoystickClose(joystick);
    1.25                          joystick = NULL;