summaryrefslogtreecommitdiff
path: root/src/resources/openglimagehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r--src/resources/openglimagehelper.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index e63295c8c..c67ec8a1c 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -43,6 +43,7 @@
#include "resources/image/image.h"
+#include "utils/checkutils.h"
#include "utils/sdlcheckutils.h"
#include <SDL_image.h>
@@ -70,7 +71,7 @@ Image *OpenGLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
SDL_Surface *const tmpImage = loadPng(rw);
if (!tmpImage)
{
- logger->log("Error, image load failed: %s", IMG_GetError());
+ reportAlways("Error, image load failed: %s", IMG_GetError());
return nullptr;
}
@@ -156,8 +157,8 @@ SDL_Surface *OpenGLImageHelper::convertSurfaceNormalize(SDL_Surface *tmpImage,
if (realWidth < width || realHeight < height)
{
- logger->log("Warning: image too large, cropping to %dx%d texture!",
- tmpImage->w, tmpImage->h);
+ reportAlways("Warning: image too large, cropping to %dx%d texture!",
+ tmpImage->w, tmpImage->h);
}
#ifdef USE_SDL2
@@ -196,7 +197,7 @@ SDL_Surface *OpenGLImageHelper::convertSurfaceNormalize(SDL_Surface *tmpImage,
if (!tmpImage)
{
- logger->log("Error, image convert failed: out of memory");
+ reportAlways("Error, image convert failed: out of memory");
return nullptr;
}
SDL_BlitSurface(oldImage, nullptr, tmpImage, nullptr);
@@ -245,7 +246,7 @@ SDL_Surface *OpenGLImageHelper::convertSurface(SDL_Surface *tmpImage,
if (!tmpImage)
{
- logger->log("Error, image convert failed: out of memory");
+ reportAlways("Error, image convert failed: out of memory");
return nullptr;
}
SDL_BlitSurface(oldImage, nullptr, tmpImage, nullptr);
@@ -299,7 +300,7 @@ void OpenGLImageHelper::bindTexture(const GLuint texture)
case RENDER_NULL:
case RENDER_LAST:
default:
- logger->log("Unknown OpenGL backend: %d", mUseOpenGL);
+ reportAlways("Unknown OpenGL backend: %d", mUseOpenGL);
break;
}
}
@@ -394,7 +395,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
if (error)
{
std::string errmsg = GraphicsManager::errorToString(error);
- logger->log("Error: Image GL import failed: %s (%u)",
+ reportAlways("Error: Image GL import failed: %s (%u)",
errmsg.c_str(), error);
// return nullptr;
}