mirror of
https://github.com/yawut/SDL.git
synced 2026-07-06 02:28:37 -05:00
SDL 2.0 supports 32-bit icons with alpha. :)
This commit is contained in:
parent
9d6d75b762
commit
0cdb7950b4
|
|
@ -546,15 +546,11 @@ LoadIcon(const char *file)
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user