summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;