summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5d06cf97..a6c07467 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -230,15 +230,19 @@ void init_engine()
fullscreen = ((int)config.getValue("screen", 0) == 1);
hwaccel = ((int)config.getValue("hwaccel", 0) == 1);
+#ifdef USE_OPENGL
bool useOpenGL = (config.getValue("opengl", 0) == 1);
-#ifdef USE_OPENGL
// Setup image loading for the right image format
Image::setLoadAsOpenGL(useOpenGL);
-#endif
// Create the graphics context
graphics = new Graphics(useOpenGL);
+#else
+ // Create the graphics context
+ graphics = new Graphics();
+#endif
+
// Try to set the desired video mode
if (!graphics->setVideoMode(width, height, bpp, fullscreen, hwaccel)) {