summaryrefslogtreecommitdiff
path: root/src/resources/imagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-26 16:09:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-26 16:52:08 +0300
commit929aeb1591e739588cd8cf629e7d7ac5a95261b1 (patch)
tree2b61b477d0e0ffed31a90ba2d6c019da926282aa /src/resources/imagehelper.cpp
parentb661524e8b7b41cec237492ecd52fdda7b9be394 (diff)
downloadplus-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.gz
plus-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.bz2
plus-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.xz
plus-929aeb1591e739588cd8cf629e7d7ac5a95261b1.zip
add surface allocation debug code.
Diffstat (limited to 'src/resources/imagehelper.cpp')
-rw-r--r--src/resources/imagehelper.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp
index 65af2755a..8a97b4a81 100644
--- a/src/resources/imagehelper.cpp
+++ b/src/resources/imagehelper.cpp
@@ -31,6 +31,8 @@
#include "resources/image.h"
+#include "utils/sdlcheckutils.h"
+
#include <SDL_image.h>
#include "debug.h"
@@ -51,7 +53,7 @@ Image *ImageHelper::load(SDL_RWops *const rw) const
Image *const image = load(tmpImage);
- SDL_FreeSurface(tmpImage);
+ MSDL_FreeSurface(tmpImage);
return image;
}
@@ -94,7 +96,7 @@ SDL_Surface* ImageHelper::convertTo32Bit(SDL_Surface *const tmpImage)
RGBAFormat.Ashift = 0;
RGBAFormat.Aloss = 0;
#endif
- return SDL_ConvertSurface(tmpImage, &RGBAFormat, SDL_SWSURFACE);
+ return MSDL_ConvertSurface(tmpImage, &RGBAFormat, SDL_SWSURFACE);
}
void ImageHelper::dumpSurfaceFormat(const SDL_Surface *const image) const
@@ -128,7 +130,7 @@ SDL_Surface *ImageHelper::loadPng(SDL_RWops *const rw)
logger->log("Error, image is not png");
return nullptr;
}
- SDL_Surface *const tmpImage = IMG_LoadPNG_RW(rw);
+ SDL_Surface *const tmpImage = MIMG_LoadPNG_RW(rw);
SDL_RWclose(rw);
return tmpImage;
}