summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-13 02:56:35 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-13 02:56:35 +0300
commit53b1071058204317d37a1b7b8a594ba40ebfb442 (patch)
treea13730fce3b8c49aa7e43ea0a4bd226e9c11db18 /src
parentd8602b208cf89c273129592d1147e487030c22c6 (diff)
downloadmv-53b1071058204317d37a1b7b8a594ba40ebfb442.tar.gz
mv-53b1071058204317d37a1b7b8a594ba40ebfb442.tar.bz2
mv-53b1071058204317d37a1b7b8a594ba40ebfb442.tar.xz
mv-53b1071058204317d37a1b7b8a594ba40ebfb442.zip
Fix compilation with SDL 2 < 2.0.1
Diffstat (limited to 'src')
-rw-r--r--src/render/graphics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index db452aed5..09a21fff1 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -246,8 +246,10 @@ int Graphics::getOpenGLFlags() const restrict2
int displayFlags = SDL_WINDOW_OPENGL;
if (mFullscreen)
displayFlags |= SDL_WINDOW_FULLSCREEN;
+#if SDL_VERSION_ATLEAST(2, 0, 1)
if (mAllowHighDPI)
displayFlags |= SDL_WINDOW_ALLOW_HIGHDPI;
+#endif // SDL_VERSION_ATLEAST(2, 0, 1)
#else // USE_SDL2
int displayFlags = SDL_ANYFORMAT | SDL_OPENGL;
@@ -387,8 +389,10 @@ int Graphics::getSoftwareFlags() const restrict2
{
#ifdef USE_SDL2
int displayFlags = SDL_WINDOW_SHOWN;
+#if SDL_VERSION_ATLEAST(2, 0, 1)
if (mAllowHighDPI)
displayFlags |= SDL_WINDOW_ALLOW_HIGHDPI;
+#endif // SDL_VERSION_ATLEAST(2, 0, 1)
#else // USE_SDL2
int displayFlags = SDL_ANYFORMAT;