summaryrefslogtreecommitdiff
path: root/src/gui/setup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r--src/gui/setup.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index eb9121bc..cda9ae31 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -22,6 +22,7 @@
*/
#include "setup.h"
+#include "gui.h"
#include "button.h"
#include "checkbox.h"
#include "scrollarea.h"
@@ -34,8 +35,6 @@
#define SETUP_WIDTH 240
-extern SDL_Surface *screen;
-
ModeListModel::ModeListModel()
{
SDL_Rect **modes;
@@ -236,14 +235,18 @@ void Setup::action(const std::string &eventId)
//displayFlags |= SDL_OPENGL;
//SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
}
-
- screen = SDL_SetVideoMode(screenW, screenH, bitDepth, displayFlags);
+
+ SDL_Surface *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);
}
+
+ guiGraphics->setScreen(screen);
}
// Sound settings