summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-25 19:51:04 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-25 19:51:04 +0000
commit2f0a5668ea937d1441399f2014bf9572902a9fb4 (patch)
tree1e7f916c37e65666edafe2e7ae25d3087508e9f1 /src/main.cpp
parent4e7be9f904f70e4a2e3d598602d03cddeaef8a74 (diff)
downloadmana-client-2f0a5668ea937d1441399f2014bf9572902a9fb4.tar.gz
mana-client-2f0a5668ea937d1441399f2014bf9572902a9fb4.tar.bz2
mana-client-2f0a5668ea937d1441399f2014bf9572902a9fb4.tar.xz
mana-client-2f0a5668ea937d1441399f2014bf9572902a9fb4.zip
Fixed unable to click away sound error dialogs.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6f9eeeb0..5a4eac7d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -195,6 +195,7 @@ void init_engine() {
if ((int)config.getValue("screen", 0)) {
displayFlags |= SDL_FULLSCREEN;
}
+#ifndef USE_OPENGL
if ((int)config.getValue("hwaccel", 0)) {
std::cout << "Attempting to use hardware acceleration.\n";
displayFlags |= SDL_HWSURFACE | SDL_DOUBLEBUF;
@@ -202,6 +203,10 @@ void init_engine() {
else {
displayFlags |= SDL_SWSURFACE;
}
+#else
+ displayFlags |= SDL_OPENGL;
+ SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+#endif
screen = SDL_SetVideoMode(800, 600, 32, displayFlags);
if (screen == NULL) {
@@ -210,6 +215,12 @@ void init_engine() {
exit(1);
}
+#ifdef USE_OPENGL
+ // Setup OpenGL
+ glViewport(0, 0, 800, 600);
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+#endif
+
#ifdef __DEBUG
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
std::cout << "It is " << ((vi->hw_available) ? "" : "not") <<
@@ -301,6 +312,8 @@ int main(int argc, char *argv[]) {
state = EXIT;
break;
}
+
+ guiInput->pushInput(event);
}
switch (state) {