test/testrumble.c
changeset 6771 55337ff4256f
parent 5535 96594ac5fd1a
child 7437 964e8876ad3b
     1.1 --- a/test/testrumble.c	Sat Dec 22 20:13:25 2012 -0800
     1.2 +++ b/test/testrumble.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 @@ -142,3 +144,13 @@
    1.23      return 0;
    1.24  }
    1.25  
    1.26 +#else
    1.27 +
    1.28 +int
    1.29 +main(int argc, char *argv[])
    1.30 +{
    1.31 +    fprintf(stderr, "SDL compiled without Haptic support.\n");
    1.32 +    exit(1);
    1.33 +}
    1.34 +
    1.35 +#endif