summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/setup.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index b0a35380..9f304b61 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -207,7 +207,14 @@ void Setup::action(const std::string &eventId)
displayFlags &= ~SDL_FULLSCREEN;
}
+ displayFlags |= SDL_DOUBLEBUF;
+
screen = SDL_SetVideoMode(screenW, screenH, bitDepth, displayFlags);
+ if (screen == NULL) {
+ std::cerr << "Couldn't set " << screenW << "x" << screenH << "x" <<
+ bitDepth << " video mode: " << SDL_GetError() << std::endl;
+ exit(1);
+ }
/* if (displayFlags & SDL_FULLSCREEN) {
#ifdef WIN32