Skip to content

Commit

Permalink
add logging for the case when haptic is not detected on the joystick …
Browse files Browse the repository at this point in the history
…as well.
  • Loading branch information
urkle committed Feb 4, 2014
1 parent e0e6b2a commit 8512f1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/testhotplug.c
Expand Up @@ -78,9 +78,13 @@ main(int argc, char *argv[])
haptic = NULL;
}
} else {
SDL_Log("Joy haptic FAILED!\n");
SDL_Log("Joy haptic open FAILED!\n");
}
}
else
{
SDL_Log("No haptic found\n");
}
}
break;
case SDL_JOYDEVICEREMOVED:
Expand All @@ -91,6 +95,7 @@ main(int argc, char *argv[])
if(haptic)
{
SDL_HapticClose(haptic);
haptic = NULL;
}
SDL_JoystickClose(joystick);
joystick = NULL;
Expand Down

0 comments on commit 8512f1b

Please sign in to comment.