* Displays information about the haptic device. */
| 319 | * Displays information about the haptic device. |
| 320 | */ |
| 321 | static void |
| 322 | HapticPrintSupported(SDL_Haptic * haptic) |
| 323 | { |
| 324 | unsigned int supported; |
| 325 | |
| 326 | supported = SDL_HapticQuery(haptic); |
| 327 | SDL_Log(" Supported effects [%d effects, %d playing]:\n", |
| 328 | SDL_HapticNumEffects(haptic), SDL_HapticNumEffectsPlaying(haptic)); |
| 329 | if (supported & SDL_HAPTIC_CONSTANT) |
| 330 | SDL_Log(" constant\n"); |
| 331 | if (supported & SDL_HAPTIC_SINE) |
| 332 | SDL_Log(" sine\n"); |
| 333 | /* !!! FIXME: put this back when we have more bits in 2.1 */ |
| 334 | /* if (supported & SDL_HAPTIC_SQUARE) |
| 335 | SDL_Log(" square\n"); */ |
| 336 | if (supported & SDL_HAPTIC_TRIANGLE) |
| 337 | SDL_Log(" triangle\n"); |
| 338 | if (supported & SDL_HAPTIC_SAWTOOTHUP) |
| 339 | SDL_Log(" sawtoothup\n"); |
| 340 | if (supported & SDL_HAPTIC_SAWTOOTHDOWN) |
| 341 | SDL_Log(" sawtoothdown\n"); |
| 342 | if (supported & SDL_HAPTIC_RAMP) |
| 343 | SDL_Log(" ramp\n"); |
| 344 | if (supported & SDL_HAPTIC_FRICTION) |
| 345 | SDL_Log(" friction\n"); |
| 346 | if (supported & SDL_HAPTIC_SPRING) |
| 347 | SDL_Log(" spring\n"); |
| 348 | if (supported & SDL_HAPTIC_DAMPER) |
| 349 | SDL_Log(" damper\n"); |
| 350 | if (supported & SDL_HAPTIC_INERTIA) |
| 351 | SDL_Log(" inertia\n"); |
| 352 | if (supported & SDL_HAPTIC_CUSTOM) |
| 353 | SDL_Log(" custom\n"); |
| 354 | if (supported & SDL_HAPTIC_LEFTRIGHT) |
| 355 | SDL_Log(" left/right\n"); |
| 356 | SDL_Log(" Supported capabilities:\n"); |
| 357 | if (supported & SDL_HAPTIC_GAIN) |
| 358 | SDL_Log(" gain\n"); |
| 359 | if (supported & SDL_HAPTIC_AUTOCENTER) |
| 360 | SDL_Log(" autocenter\n"); |
| 361 | if (supported & SDL_HAPTIC_STATUS) |
| 362 | SDL_Log(" status\n"); |
| 363 | } |
| 364 | |
| 365 | #else |
| 366 |