diff test/testspriteminimal.c @ 5161:b3ccd1947786

Simplified and improved the process of creating a texture from a surface.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 03 Feb 2011 00:54:29 -0800
parents ad50b3db78bd
children
line wrap: on
line diff
--- a/test/testspriteminimal.c	Thu Feb 03 00:22:18 2011 -0800
+++ b/test/testspriteminimal.c	Thu Feb 03 00:54:29 2011 -0800
@@ -60,11 +60,7 @@
     }
 
     /* Create textures from the image */
-    sprite = SDL_CreateTextureFromSurface(renderer, 0, temp);
-    if (!sprite) {
-        SDL_SetColorKey(temp, 0, 0);
-        sprite = SDL_CreateTextureFromSurface(renderer, 0, temp);
-    }
+    sprite = SDL_CreateTextureFromSurface(renderer, temp);
     if (!sprite) {
         fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError());
         SDL_FreeSurface(temp);