test/testver.c
changeset 2983 388c5a2daeac
parent 1895 c121d94672cb
child 4419 5e7e1f1a4056
     1.1 --- a/test/testver.c	Sun Jan 04 05:08:12 2009 +0000
     1.2 +++ b/test/testver.c	Sun Jan 04 05:27:13 2009 +0000
     1.3 @@ -12,26 +12,19 @@
     1.4  main(int argc, char *argv[])
     1.5  {
     1.6      SDL_version compiled;
     1.7 +    SDL_version linked;
     1.8  
     1.9 -    /* Initialize SDL */
    1.10 -    if (SDL_Init(0) < 0) {
    1.11 -        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    1.12 -        exit(1);
    1.13 -    }
    1.14 -#ifdef DEBUG
    1.15 -    fprintf(stderr, "SDL initialized\n");
    1.16 -#endif
    1.17 -#if SDL_VERSION_ATLEAST(1, 2, 0)
    1.18 -    printf("Compiled with SDL 1.2 or newer\n");
    1.19 +#if SDL_VERSION_ATLEAST(1, 3, 0)
    1.20 +    printf("Compiled with SDL 1.3 or newer\n");
    1.21  #else
    1.22 -    printf("Compiled with SDL older than 1.2\n");
    1.23 +    printf("Compiled with SDL older than 1.3\n");
    1.24  #endif
    1.25      SDL_VERSION(&compiled);
    1.26 -    printf("Compiled version: %d.%d.%d\n",
    1.27 -           compiled.major, compiled.minor, compiled.patch);
    1.28 -    printf("Linked version: %d.%d.%d\n",
    1.29 -           SDL_Linked_Version()->major,
    1.30 -           SDL_Linked_Version()->minor, SDL_Linked_Version()->patch);
    1.31 +    printf("Compiled version: %d.%d.%d-%d\n",
    1.32 +           compiled.major, compiled.minor, compiled.patch, SDL_REVISION);
    1.33 +    SDL_GetVersion(&linked);
    1.34 +    printf("Linked version: %d.%d.%d-%d\n",
    1.35 +           linked.major, linked.minor, linked.patch, SDL_GetRevision());
    1.36      SDL_Quit();
    1.37      return (0);
    1.38  }