aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/openglsdl
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/openglsdl')
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 0fcee18605..eefba59089 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -54,6 +54,10 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager()
SDL_ShowCursor(SDL_DISABLE);
// Get desktop resolution
+ // TODO: In case the OpenGL manager is created *after* a plain SDL manager
+ // has been used, this will return the last setup graphics mode rather
+ // than the desktop resolution. We should really look into a way to
+ // properly retrieve the desktop resolution.
const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo();
if (videoInfo->current_w > 0 && videoInfo->current_h > 0) {
_desktopWidth = videoInfo->current_w;