Definition at line 24 of file testhotplug.c.
34 for (
i = 1;
i < argc; ++
i) {
76 SDL_Log(
"Only one joystick supported by this test\n");
109 if (instance ==
event.jdevice.which)
113 if(enable_haptic &&
haptic)
121 SDL_Log(
"Unknown joystick diconnected\n");
133 if(enable_haptic &&
haptic)
137 if (
event.jbutton.button == 0) {
138 SDL_Log(
"Exiting due to button press of button 0\n");
#define SDL_INIT_JOYSTICK
#define SDL_JoystickClose
#define SDL_JoystickIsHaptic
#define SDL_HapticRumbleInit
#define SDL_LogSetPriority
#define SDL_HapticRumblePlay
#define SDL_HapticOpenFromJoystick
#define SDL_JoystickInstanceID
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
A variable that lets you enable joystick (and gamecontroller) events even when your app is in the bac...
@ SDL_LOG_CATEGORY_APPLICATION
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
static SDL_Haptic * haptic
static SDL_Joystick * joystick
References haptic, i, joystick, NULL, SDL_FALSE, SDL_GetError, SDL_HapticClose, SDL_HapticOpenFromJoystick, SDL_HapticRumbleInit, SDL_HapticRumblePlay, SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, SDL_Init, SDL_INIT_HAPTIC, SDL_INIT_JOYSTICK, SDL_INIT_VIDEO, SDL_JOYAXISMOTION, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP, SDL_JOYDEVICEADDED, SDL_JOYDEVICEREMOVED, SDL_JoystickClose, SDL_JoystickInstanceID, SDL_JoystickIsHaptic, SDL_JoystickName, SDL_JoystickOpen, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, SDL_NumHaptics, SDL_NumJoysticks, SDL_PollEvent, SDL_QUIT, SDL_Quit, SDL_SetHint, SDL_strcasecmp, and SDL_TRUE.