summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/image.cpp4
-rw-r--r--src/resources/openglimagehelper.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 3d5d58620..c289c90cd 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -413,7 +413,9 @@ Image *Image::getSubImage(const int x, const int y,
{
// Create a new clipped sub-image
#ifdef USE_OPENGL
- if (OpenGLImageHelper::mUseOpenGL != RENDER_SOFTWARE)
+ const RenderType mode = OpenGLImageHelper::mUseOpenGL;
+ if (mode == RENDER_NORMAL_OPENGL || mode == RENDER_SAFE_OPENGL
+ || mode == RENDER_GLES_OPENGL)
{
return new SubImage(this, mGLImage, x, y, width, height,
mTexWidth, mTexHeight);
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index e686d6f5a..c41538b2e 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -215,6 +215,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
MobileOpenGLGraphics::bindTexture(mTextureType, texture);
break;
case RENDER_SOFTWARE:
+ case RENDER_SDL2_DEFAULT:
default:
logger->log("Unknown OpenGL backend: %d", mUseOpenGL);
break;