diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-17 23:57:16 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-17 23:57:16 +0000 |
commit | 39ea054b214612ae7d56a01884904dcb63181598 (patch) | |
tree | 975b05806f0e939d3f2369b46676009f89e692c8 | |
parent | 40e8a99139fa494f837670737c25755817b961a4 (diff) | |
download | mana-client-39ea054b214612ae7d56a01884904dcb63181598.tar.gz mana-client-39ea054b214612ae7d56a01884904dcb63181598.tar.bz2 mana-client-39ea054b214612ae7d56a01884904dcb63181598.tar.xz mana-client-39ea054b214612ae7d56a01884904dcb63181598.zip |
Added support for hwaccel option.
-rw-r--r-- | src/main.cpp | 13 | ||||
-rw-r--r-- | tmw.ini | 10 |
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(); @@ -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 |