summaryrefslogtreecommitdiff
path: root/test/testspriteminimal.c
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2012-01-22 19:47:33 -0500
committerSam Lantinga <slouken@libsdl.org>2012-01-22 19:47:33 -0500
commite1e518908a9d1db3e7095f00f22be8ed4b8d395f (patch)
tree7984871a8d94187dc0ebe3112a27648890a383e9 /test/testspriteminimal.c
parent14703f45a7f407ffae16a2e9ebdbb22789f88be9 (diff)
downloadsdl-e1e518908a9d1db3e7095f00f22be8ed4b8d395f.tar.gz
Have testspriteminimal use the new simple API
Diffstat (limited to 'test/testspriteminimal.c')
-rw-r--r--test/testspriteminimal.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/test/testspriteminimal.c b/test/testspriteminimal.c
index ad28cf1d5..48e996c01 100644
--- a/test/testspriteminimal.c
+++ b/test/testspriteminimal.c
@@ -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;
@@ -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);
}