Mercurial > sdl-ios-xcode
changeset 3285:0d7b20a4a629
Fall back to opaque sprite if no formats with alpha are supported.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 20 Sep 2009 23:09:30 +0000 |
parents | 2b95b2c0b6d4 |
children | d390778b59c1 |
files | test/testsprite2.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/testsprite2.c Sun Sep 20 22:47:28 2009 +0000 +++ b/test/testsprite2.c Sun Sep 20 23:09:30 2009 +0000 @@ -82,6 +82,10 @@ SDL_SelectRenderer(state->windows[i]); sprites[i] = SDL_CreateTextureFromSurface(0, temp); if (!sprites[i]) { + SDL_SetColorKey(temp, 0, 0); + sprites[i] = SDL_CreateTextureFromSurface(0, temp); + } + if (!sprites[i]) { fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError()); SDL_FreeSurface(temp); return (-1);