Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Have testspriteminimal use the new simple API
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 23, 2012
1 parent 3ff3cb5 commit 9855fa5
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions test/testspriteminimal.c
Expand Up @@ -47,7 +47,7 @@ LoadSprite(char *file, SDL_Renderer *renderer)
/* Load the sprite image */
temp = SDL_LoadBMP(file);
if (temp == NULL) {
fprintf(stderr, "Couldn't load %s: %s", file, SDL_GetError());
fprintf(stderr, "Couldn't load %s: %s\n", file, SDL_GetError());
return (-1);
}
sprite_w = temp->w;
Expand Down Expand Up @@ -131,17 +131,7 @@ main(int argc, char *argv[])
int i, done;
SDL_Event event;

window = SDL_CreateWindow("Happy Smileys",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
WINDOW_WIDTH, WINDOW_HEIGHT,
SDL_WINDOW_SHOWN);
if (!window) {
quit(2);
}

renderer = SDL_CreateRenderer(window, -1, 0);
if (!renderer) {
if (SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_HEIGHT, 0, &window, &renderer) < 0) {
quit(2);
}

Expand Down

0 comments on commit 9855fa5

Please sign in to comment.