]> git.localhorst.tv Git - blank.git/blobdiff - src/app/init.cpp
cleanup
[blank.git] / src / app / init.cpp
index a0ea7b51ba5d614a3df13814c4eee90468d6fe1d..78a83e1df190d741c170c2823d7a07f578daa8e6 100644 (file)
@@ -139,7 +139,7 @@ InitAL::InitAL() {
        }
 }
 
-InitAL::~InitAL() {
+InitAL::~InitAL() throw(AlutError) {
        if (!alutExit()) {
                throw AlutError(alutGetError(), "alutExit");
        }
@@ -157,9 +157,9 @@ InitGL::InitGL(bool double_buffer, int sample_size) {
                throw SDLError("SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE)");
        }
 
-       if (double_buffer) {
-               if (SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1) != 0) {
-                       throw SDLError("SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1)");
+       if (!double_buffer) {
+               if (SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0) != 0) {
+                       throw SDLError("SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0)");
                }
        }