summaryrefslogtreecommitdiff
path: root/src/resources/surfaceimagehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/surfaceimagehelper.cpp')
-rw-r--r--src/resources/surfaceimagehelper.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/resources/surfaceimagehelper.cpp b/src/resources/surfaceimagehelper.cpp
index 45a7d95fd..75e311a36 100644
--- a/src/resources/surfaceimagehelper.cpp
+++ b/src/resources/surfaceimagehelper.cpp
@@ -33,6 +33,8 @@
#include "resources/image.h"
+#include "utils/sdlcheckutils.h"
+
#include <SDL_image.h>
#include "debug.h"
@@ -65,9 +67,9 @@ Image *SurfaceImageHelper::load(SDL_RWops *const rw, Dye const &dye) const
rgba.Amask = 0x000000FF;
#endif
- SDL_Surface *const surf = SDL_ConvertSurface(
+ SDL_Surface *const surf = MSDL_ConvertSurface(
tmpImage, &rgba, SDL_SWSURFACE);
- SDL_FreeSurface(tmpImage);
+ MSDL_FreeSurface(tmpImage);
uint32_t *pixels = static_cast<uint32_t *>(surf->pixels);
const int type = dye.getType();
@@ -97,7 +99,7 @@ Image *SurfaceImageHelper::load(SDL_RWops *const rw, Dye const &dye) const
}
Image *const image = load(surf);
- SDL_FreeSurface(surf);
+ MSDL_FreeSurface(surf);
return image;
}
@@ -130,7 +132,7 @@ SDL_Surface* SurfaceImageHelper::SDLDuplicateSurface(SDL_Surface *const
if (!tmpImage || !tmpImage->format)
return nullptr;
- return SDL_ConvertSurface(tmpImage, tmpImage->format, SDL_SWSURFACE);
+ return MSDL_ConvertSurface(tmpImage, tmpImage->format, SDL_SWSURFACE);
}
Image *SurfaceImageHelper::_SDLload(SDL_Surface *tmpImage) const
@@ -161,7 +163,7 @@ SDL_Surface *SurfaceImageHelper::create32BitSurface(int width, int height) const
const int amask = 0xff000000;
#endif
- return SDL_CreateRGBSurface(SDL_SWSURFACE,
+ return MSDL_CreateRGBSurface(SDL_SWSURFACE,
width, height, 32, rmask, gmask, bmask, amask);
}