summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-14 23:57:06 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-14 23:57:06 +0000
commitcfaf8b836b21842b5d22ad774f93c2c364d33c0b (patch)
tree00dca4d03b2f9cff3ec0cef4ed8b6b05c4218c2b /src/main.cpp
parente475dc028ca49324f824a7e4d6d16f54781b9bee (diff)
downloadmana-client-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.tar.gz
mana-client-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.tar.bz2
mana-client-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.tar.xz
mana-client-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.zip
Fully removed the useOpenGL global.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 24f9cb76..5d06cf97 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -76,7 +76,6 @@ short map_port;
char map_name[16];
unsigned char state;
unsigned char screen_mode;
-bool useOpenGL = false;
volatile int framesToDraw = 0;
Sound sound;
@@ -222,10 +221,6 @@ void init_engine()
SDL_WM_SetCaption("The Mana World", NULL);
SDL_WM_SetIcon(IMG_Load(TMW_DATADIR "data/icons/tmw-icon.png"), NULL);
-#ifdef USE_OPENGL
- useOpenGL = (config.getValue("opengl", 0) == 1);
-#endif
-
int width, height, bpp;
bool fullscreen, hwaccel;
@@ -235,6 +230,13 @@ void init_engine()
fullscreen = ((int)config.getValue("screen", 0) == 1);
hwaccel = ((int)config.getValue("hwaccel", 0) == 1);
+ 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);