diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-02-28 00:12:34 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-02-28 00:12:34 +0100 |
commit | 812b420c7512ba501877d3b47ebab1dfadff4246 (patch) | |
tree | fd9b0880ff55865b7759c65c105547a56de8af38 /texturesdl.cpp | |
parent | 42fcaf7d7d374bdae934b5d9aeb32af964872681 (diff) |
Check pixel format when loading textures.
Diffstat (limited to 'texturesdl.cpp')
-rwxr-xr-x | texturesdl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/texturesdl.cpp b/texturesdl.cpp index ea7d9ac..716ea03 100755 --- a/texturesdl.cpp +++ b/texturesdl.cpp @@ -8,6 +8,7 @@ TextureSDL::TextureSDL(const char* filename) { width = image->w; height = image->h; + byte_per_pixel = image->format->BytesPerPixel; data = (unsigned char*)image->pixels; build(); |