summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-13 15:56:56 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-13 15:56:56 +0300
commitcd0baf3217701134a8e61932fd14c39cec0cf242 (patch)
tree7d18a8b58d753865c3de9027fd384035375c7ab9 /src/resources/image.cpp
parente71aed97c2d885c8113561c1e0cad91454adeb57 (diff)
downloadmanaplus-cd0baf3217701134a8e61932fd14c39cec0cf242.tar.gz
manaplus-cd0baf3217701134a8e61932fd14c39cec0cf242.tar.bz2
manaplus-cd0baf3217701134a8e61932fd14c39cec0cf242.tar.xz
manaplus-cd0baf3217701134a8e61932fd14c39cec0cf242.zip
Fix compilation errors with different flags.
Also fix renderer selection in build without OpenGL.
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r--src/resources/image.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 1a327eae1..4cb9d7f1d 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -419,7 +419,9 @@ Image *Image::getSubImage(const int x, const int y,
#endif
#ifdef USE_SDL2
- // +++ probably default sdl render is broken here
+#ifndef USE_OPENGL
+ const RenderType mode = ImageHelper::mUseOpenGL;
+#endif
if (mode == RENDER_SOFTWARE)
return new SubImage(this, mSDLSurface, x, y, width, height);
else