Lines Matching refs:haptic
38 static SDL_Haptic *haptic;
45 static void HapticPrintSupported(SDL_Haptic * haptic);
89 SDL_Log("%d Haptic devices detected.\n", SDL_NumHaptics());
109 haptic = SDL_HapticOpen(i);
110 if (haptic == NULL) {
111 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n",
116 HapticPrintSupported(haptic);
118 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Haptic devices found!\n");
128 supported = SDL_HapticQuery(haptic);
140 id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);
156 id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);
173 id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);
185 for (i = 0; i < SDL_HapticNumAxes(haptic); i++) {
192 id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);
204 for (i = 0; i < SDL_HapticNumAxes(haptic); i++) {
210 id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);
225 id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);
238 SDL_HapticRunEffect(haptic, id[i], 1);
243 if (haptic != NULL)
244 SDL_HapticClose(haptic);
259 SDL_HapticClose(haptic);
267 * Displays information about the haptic device.
270 HapticPrintSupported(SDL_Haptic * haptic)
274 supported = SDL_HapticQuery(haptic);
276 SDL_HapticNumEffects(haptic), SDL_HapticNumEffectsPlaying(haptic));
318 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Haptic support.\n");