SDL 2.0 supports 32-bit icons with alpha. :)
authorSam Lantinga <slouken@libsdl.org>
Fri, 28 Sep 2012 15:59:36 -0700
changeset 6509 e94d5a5376c1
parent 6508 81a3d541d9a2
child 6510 32432af683cf
SDL 2.0 supports 32-bit icons with alpha. :)
test/common.c
--- a/test/common.c	Fri Sep 28 14:42:47 2012 -0700
+++ b/test/common.c	Fri Sep 28 15:59:36 2012 -0700
@@ -546,15 +546,11 @@
         return (NULL);
     }
 
-    if (icon->format->palette == NULL) {
-        fprintf(stderr, "Icon must have a palette!\n");
-        SDL_FreeSurface(icon);
-        return (NULL);
+    if (icon->format->palette) {
+        /* Set the colorkey */
+        SDL_SetColorKey(icon, 1, *((Uint8 *) icon->pixels));
     }
 
-    /* Set the colorkey */
-    SDL_SetColorKey(icon, 1, *((Uint8 *) icon->pixels));
-
     return (icon);
 }