Definition at line 24 of file testhotplug.c.
References SDL_JoyButtonEvent::button, haptic, i, SDL_Event::jbutton, SDL_Event::jdevice, 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, SDL_TRUE, SDL_Event::type, and SDL_JoyDeviceEvent::which.
26 SDL_Joystick *joystick =
NULL;
34 for (i = 1; i < argc; ++
i) {
76 SDL_Log(
"Only one joystick supported by this test\n");
113 if(enable_haptic && haptic)
121 SDL_Log(
"Unknown joystick diconnected\n");
133 if(enable_haptic && haptic)
138 SDL_Log(
"Exiting due to button press of button 0\n");
#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_JoyDeviceEvent jdevice
#define SDL_HapticOpenFromJoystick
#define SDL_JoystickClose
#define SDL_INIT_JOYSTICK
SDL_JoyButtonEvent jbutton
#define SDL_JoystickInstanceID
#define SDL_JoystickIsHaptic
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)
#define SDL_LogSetPriority
static SDL_Haptic * haptic
#define SDL_HapticRumbleInit
#define SDL_HapticRumblePlay