From 40e8a99139fa494f837670737c25755817b961a4 Mon Sep 17 00:00:00 2001
From: Bjørn Lindeijer <bjorn@lindeijer.nl>
Date: Mon, 17 Jan 2005 23:30:59 +0000
Subject: Support for windowed in config file.

---
 src/main.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/main.cpp b/src/main.cpp
index 60aaf8df..df5cbeec 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -196,7 +196,14 @@ void init_engine() {
 
     SDL_WM_SetCaption("The Mana World", NULL);
 
-    screen = SDL_SetVideoMode(800, 600, 16, SDL_SWSURFACE | SDL_ANYFORMAT);
+
+    int displayFlags = SDL_SWSURFACE | SDL_ANYFORMAT;
+
+    if ((int)config.getValue("screen", 0)) {
+        displayFlags |= SDL_FULLSCREEN;
+    }
+
+    screen = SDL_SetVideoMode(800, 600, 16, displayFlags);
     if (screen == NULL) {
         std::cerr << "Couldn't set 800x600x16 video mode: " <<
             SDL_GetError() << std::endl;
-- 
cgit v1.2.3-70-g09d2