Go to the documentation of this file.
21 #if !defined SDL_JOYSTICK_DISABLED && !defined SDL_HAPTIC_DISABLED
24 main(
int argc,
char *argv[])
26 SDL_Joystick *joystick =
NULL;
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");
156 main(
int argc,
char *argv[])
#define SDL_HapticRumblePlay
#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...
#define SDL_JoystickClose
#define SDL_HapticOpenFromJoystick
#define SDL_INIT_JOYSTICK
int main(int argc, char *argv[])
#define SDL_JoystickInstanceID
#define SDL_JoystickIsHaptic
static SDL_Haptic * haptic
#define SDL_LogSetPriority
#define SDL_HapticRumbleInit
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)