summaryrefslogtreecommitdiff
path: root/texturesdl.cpp
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-02-28 00:12:34 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-02-28 00:12:34 +0100
commit812b420c7512ba501877d3b47ebab1dfadff4246 (patch)
treefd9b0880ff55865b7759c65c105547a56de8af38 /texturesdl.cpp
parent42fcaf7d7d374bdae934b5d9aeb32af964872681 (diff)
Check pixel format when loading textures.
Diffstat (limited to 'texturesdl.cpp')
-rwxr-xr-xtexturesdl.cpp1
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();