projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0608116
)
SDL: use SDL_DisplayFormat instead of SDL_DisplayFormatAlpha for images that don...
author
Tim Goya
<tuxdev103@gmail.com>
Tue, 21 Aug 2007 00:28:52 +0000
(
00:28
+0000)
committer
Tim Goya
<tuxdev103@gmail.com>
Tue, 21 Aug 2007 00:28:52 +0000
(
00:28
+0000)
SVN-Revision: 5148
src/video/sdl_texture.cpp
patch
|
blob
|
history
diff --git
a/src/video/sdl_texture.cpp
b/src/video/sdl_texture.cpp
index
2f1bc97
..
5b4b61f
100644
(file)
--- a/
src/video/sdl_texture.cpp
+++ b/
src/video/sdl_texture.cpp
@@
-406,7
+406,14
@@
namespace SDL
{
Texture::Texture(SDL_Surface* image)
{
- texture = SDL_DisplayFormatAlpha(image);
+ if(!(image->flags & SDL_SRCALPHA) || !image->format->Amask)
+ {
+ texture = SDL_DisplayFormat(image);
+ }
+ else
+ {
+ texture = SDL_DisplayFormatAlpha(image);
+ }
//width = texture->w;
//height = texture->h;
int numerator, denominator;