summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp13
-rw-r--r--tmw.ini10
2 files changed, 15 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index df5cbeec..758e18f3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -197,11 +197,18 @@ void init_engine() {
SDL_WM_SetCaption("The Mana World", NULL);
- int displayFlags = SDL_SWSURFACE | SDL_ANYFORMAT;
+ int displayFlags = SDL_ANYFORMAT;
if ((int)config.getValue("screen", 0)) {
displayFlags |= SDL_FULLSCREEN;
}
+ if ((int)config.getValue("hwaccel", 0)) {
+ std::cout << "Attempting to use hardware acceleration.\n";
+ displayFlags |= SDL_HWSURFACE | SDL_DOUBLEBUF;
+ }
+ else {
+ displayFlags |= SDL_SWSURFACE;
+ }
screen = SDL_SetVideoMode(800, 600, 16, displayFlags);
if (screen == NULL) {
@@ -210,10 +217,6 @@ void init_engine() {
exit(1);
}
- //if (set_gfx_mode((unsigned char)config.getValue("screen", 0), 800, 600,
- // 0, 0)) {
- //}
-
// Create the graphics context
graphics = new Graphics();
diff --git a/tmw.ini b/tmw.ini
index c1e9da5e..48ea652d 100644
--- a/tmw.ini
+++ b/tmw.ini
@@ -14,9 +14,13 @@ port=6901
[settings]
# Screen mode:
-# 1 Fullscreen
-# 2 Windowed
-screen=2
+# 0 Fullscreen
+# 1 Windowed
+screen=1
+# Hardware acceleration
+# 0 No
+# 1 Yes
+hwaccel=0
# Sound:
# 1 enabled
# 0 disabled