The entry point of this force feedback demo.
- Parameters
-
[in] | argc | Number of arguments. |
[in] | argv | Array of argc arguments. |
Definition at line 45 of file testrumble.c.
46{
50
51
53
56 if (argc > 1) {
57 size_t l;
59 if ((strcmp(
name,
"--help") == 0) || (strcmp(
name,
"-h") == 0)) {
61 "If device is a two-digit number it'll use it as an index, otherwise\n"
62 "it'll use it as if it were part of the device's name.\n",
63 argv[0]);
64 return 0;
65 }
66
71 }
72 }
73
74
79
82 }
83
84 else {
87 break;
88 }
89
93 return 1;
94 }
95 }
96
101 return 1;
102 }
104 } else {
106 return 1;
107 }
108
109
111
114 return 1;
115 }
118 return 1;
119 }
120 SDL_Log(
"Playing 2 second rumble at 0.5 magnitude.\n");
123 return 1;
124 }
129 SDL_Log(
"Playing 2 second rumble at 0.3 magnitude.\n");
132 return 1;
133 }
135
136
140
141 return 0;
142}
#define SDL_INIT_JOYSTICK
#define SDL_HapticRumbleSupported
#define SDL_HapticRumbleStop
#define SDL_HapticRumbleInit
#define SDL_LogSetPriority
#define SDL_HapticRumblePlay
@ SDL_LOG_CATEGORY_APPLICATION
GLuint const GLchar * name
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
References haptic, i, NULL, SDL_atoi, SDL_ClearError, SDL_Delay, SDL_FALSE, SDL_GetError, SDL_HapticClose, SDL_HapticName, SDL_HapticOpen, SDL_HapticRumbleInit, SDL_HapticRumblePlay, SDL_HapticRumbleStop, SDL_HapticRumbleSupported, SDL_Init, SDL_INIT_HAPTIC, SDL_INIT_JOYSTICK, SDL_INIT_TIMER, SDL_INIT_VIDEO, SDL_isdigit, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, SDL_NumHaptics, SDL_Quit, and SDL_strlen.