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");
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");
156 main(
int argc,
char *argv[])
#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
int main(int argc, char *argv[])
#define SDL_HapticRumblePlay