Have testspriteminimal use the new simple API
authorSam Lantinga <slouken@libsdl.org>
Sun, 22 Jan 2012 19:47:33 -0500
changeset 62594aef5b792087
parent 6258 fce7ce72677b
child 6260 fd494c5f305b
Have testspriteminimal use the new simple API
test/testspriteminimal.c
     1.1 --- a/test/testspriteminimal.c	Sun Jan 22 19:22:53 2012 -0500
     1.2 +++ b/test/testspriteminimal.c	Sun Jan 22 19:47:33 2012 -0500
     1.3 @@ -47,7 +47,7 @@
     1.4      /* Load the sprite image */
     1.5      temp = SDL_LoadBMP(file);
     1.6      if (temp == NULL) {
     1.7 -        fprintf(stderr, "Couldn't load %s: %s", file, SDL_GetError());
     1.8 +        fprintf(stderr, "Couldn't load %s: %s\n", file, SDL_GetError());
     1.9          return (-1);
    1.10      }
    1.11      sprite_w = temp->w;
    1.12 @@ -131,17 +131,7 @@
    1.13      int i, done;
    1.14      SDL_Event event;
    1.15  
    1.16 -    window = SDL_CreateWindow("Happy Smileys",
    1.17 -                              SDL_WINDOWPOS_UNDEFINED,
    1.18 -                              SDL_WINDOWPOS_UNDEFINED,
    1.19 -                              WINDOW_WIDTH, WINDOW_HEIGHT,
    1.20 -                              SDL_WINDOW_SHOWN);
    1.21 -    if (!window) {
    1.22 -        quit(2);
    1.23 -    }
    1.24 -
    1.25 -    renderer = SDL_CreateRenderer(window, -1, 0);
    1.26 -    if (!renderer) {
    1.27 +    if (SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_HEIGHT, 0, &window, &renderer) < 0) {
    1.28          quit(2);
    1.29      }
    1.30