diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 8 insertions, 5 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(); |