From 57288890689bfa2c2d35882169a539813be621f1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Sep 2013 00:32:07 +0300 Subject: add RWops leaks reporting. --- src/resources/resourcemanager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/resources/resourcemanager.cpp') diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 3d13e6e00..bd422ca0e 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -41,6 +41,7 @@ #include "resources/spritedef.h" #include "utils/mkdir.h" +#include "utils/physfscheckutils.h" #include "utils/physfsrwops.h" #include "utils/sdlcheckutils.h" @@ -567,7 +568,7 @@ struct ResourceLoader return nullptr; const ResourceLoader *const rl = static_cast(v); - SDL_RWops *const rw = PHYSFSRWOPS_openRead(rl->path.c_str()); + SDL_RWops *const rw = MPHYSFSRWOPS_openRead(rl->path.c_str()); if (!rw) return nullptr; Resource *const res = rl->fun(rw); @@ -613,7 +614,7 @@ struct DyedImageLoader d = new Dye(path.substr(p + 1)); path = path.substr(0, p); } - SDL_RWops *const rw = PHYSFSRWOPS_openRead(path.c_str()); + SDL_RWops *const rw = MPHYSFSRWOPS_openRead(path.c_str()); if (!rw) { delete d; @@ -1044,7 +1045,7 @@ void ResourceManager::saveTextFile(std::string path, const std::string &name, SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename) const { - if (SDL_RWops *const rw = PHYSFSRWOPS_openRead(filename.c_str())) + if (SDL_RWops *const rw = MPHYSFSRWOPS_openRead(filename.c_str())) { if (!IMG_isPNG(rw)) { -- cgit v1.2.3-60-g2f50