Mercurial > hg > dmlib
comparison src/dmimage.c @ 1203:2b48b7fe95bc
Use dmfreset() instead of dmfseek() to seek to stream start.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 05 Mar 2015 16:57:27 +0200 |
parents | 737ae4718c8f |
children | 5e5f75b45f8d |
comparison
equal
deleted
inserted
replaced
1202:9c1cde761c51 | 1203:2b48b7fe95bc |
---|---|
122 Uint32 rmask, gmask, bmask, amask; | 122 Uint32 rmask, gmask, bmask, amask; |
123 SDL_Surface *result = NULL; | 123 SDL_Surface *result = NULL; |
124 int width = 0, height = 0, comp = 0; | 124 int width = 0, height = 0, comp = 0; |
125 Uint8 *data; | 125 Uint8 *data; |
126 | 126 |
127 dmfseek(file, 0, SEEK_SET); | 127 dmfreset(file); |
128 data = stbi_load_from_callbacks(&dmSTBICallbacks, file, &width, &height, &comp, 0); | 128 data = stbi_load_from_callbacks(&dmSTBICallbacks, file, &width, &height, &comp, 0); |
129 | 129 |
130 if (data == NULL) | 130 if (data == NULL) |
131 { | 131 { |
132 dmErrorDBGMsg( | 132 dmErrorDBGMsg( |