summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-17 23:30:59 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-17 23:30:59 +0000
commit40e8a99139fa494f837670737c25755817b961a4 (patch)
tree54112c62a52fe744c89370a78717b828810432c6
parentbe44b930402c7d6cc8818bb209eed8a155b25e1b (diff)
downloadmana-40e8a99139fa494f837670737c25755817b961a4.tar.gz
mana-40e8a99139fa494f837670737c25755817b961a4.tar.bz2
mana-40e8a99139fa494f837670737c25755817b961a4.tar.xz
mana-40e8a99139fa494f837670737c25755817b961a4.zip
Support for windowed in config file.
-rw-r--r--src/main.cpp9
1 files changed, 8 insertions, 1 deletions
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;