From 929aeb1591e739588cd8cf629e7d7ac5a95261b1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 26 Aug 2013 16:09:58 +0300 Subject: add surface allocation debug code. --- src/resources/atlasmanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/resources/atlasmanager.cpp') diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp index 01ea66233..80b0ad253 100644 --- a/src/resources/atlasmanager.cpp +++ b/src/resources/atlasmanager.cpp @@ -31,6 +31,7 @@ #include "utils/mathutils.h" #include "utils/physfsrwops.h" +#include "utils/sdlcheckutils.h" #include "resources/dye.h" #include "resources/fboinfo.h" @@ -79,7 +80,7 @@ AtlasResource *AtlasManager::loadTextureAtlas(const std::string &name, convertAtlas(atlas); // free SDL atlas surface - SDL_FreeSurface(surface); + MSDL_FreeSurface(surface); resource->atlases.push_back(atlas); } @@ -226,7 +227,7 @@ SDL_Surface *AtlasManager::createSDLAtlas(TextureAtlas *const atlas) const int width = atlas->width; const int height = atlas->height; // temp SDL surface for atlas - SDL_Surface *const surface = SDL_CreateRGBSurface(SDL_SWSURFACE, + SDL_Surface *const surface = MSDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32, rmask, gmask, bmask, amask); if (!surface) return nullptr; -- cgit v1.2.3-70-g09d2