test/testhaptic.c
changeset 6771 55337ff4256f
parent 5535 96594ac5fd1a
child 7263 8d69588e0269
     1.1 --- a/test/testhaptic.c	Sat Dec 22 20:13:25 2012 -0800
     1.2 +++ b/test/testhaptic.c	Sat Dec 22 20:43:51 2012 -0800
     1.3 @@ -26,13 +26,15 @@
     1.4   * includes
     1.5   */
     1.6  #include <stdlib.h>
     1.7 -#include "SDL.h"
     1.8 -#include "SDL_haptic.h"
     1.9 -
    1.10  #include <stdio.h>              /* printf */
    1.11  #include <string.h>             /* strstr */
    1.12  #include <ctype.h>              /* isdigit */
    1.13  
    1.14 +#include "SDL.h"
    1.15 +
    1.16 +#ifndef SDL_HAPTIC_DISABLED
    1.17 +
    1.18 +#include "SDL_haptic.h"
    1.19  
    1.20  static SDL_Haptic *haptic;
    1.21  
    1.22 @@ -286,3 +288,14 @@
    1.23      if (supported & SDL_HAPTIC_STATUS)
    1.24          printf("      status\n");
    1.25  }
    1.26 +
    1.27 +#else
    1.28 +
    1.29 +int
    1.30 +main(int argc, char *argv[])
    1.31 +{
    1.32 +    fprintf(stderr, "SDL compiled without Haptic support.\n");
    1.33 +    exit(1);
    1.34 +}
    1.35 +
    1.36 +#endif