summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.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/resourcemanager.cpp
parentb661524e8b7b41cec237492ecd52fdda7b9be394 (diff)
downloadmanaverse-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.gz
manaverse-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.bz2
manaverse-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.xz
manaverse-929aeb1591e739588cd8cf629e7d7ac5a95261b1.zip
add surface allocation debug code.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 6015347a9..662024f36 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -42,6 +42,7 @@
#include "utils/mkdir.h"
#include "utils/physfsrwops.h"
+#include "utils/sdlcheckutils.h"
#include <SDL_image.h>
#include <cassert>
@@ -1047,7 +1048,7 @@ SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename) const
logger->log("Error, image is not png: " + filename);
return nullptr;
}
- SDL_Surface *const surface = IMG_LoadPNG_RW(rw);
+ SDL_Surface *const surface = MIMG_LoadPNG_RW(rw);
SDL_RWclose(rw);
return surface;
}
@@ -1063,7 +1064,7 @@ void ResourceManager::clearScheduled()
{
BLOCK_START("ResourceManager::clearScheduled")
FOR_EACH (std::set<SDL_Surface*>::iterator, i, deletedSurfaces)
- SDL_FreeSurface(*i);
+ MSDL_FreeSurface(*i);
deletedSurfaces.clear();
BLOCK_END("ResourceManager::clearScheduled")
}