]> git.localhorst.tv Git - blank.git/blobdiff - src/app/init.cpp
first test for actual program binary
[blank.git] / src / app / init.cpp
index f4bcd01f45a230c4a1d928f967f60c0ff494ba19..78a83e1df190d741c170c2823d7a07f578daa8e6 100644 (file)
@@ -91,6 +91,8 @@ InitVideo::InitVideo() {
        if (SDL_InitSubSystem(SDL_INIT_VIDEO) != 0) {
                throw SDLError("SDL_InitSubSystem(SDL_INIT_VIDEO)");
        }
+       // SDL seems to start out in text input state
+       SDL_StopTextInput();
 }
 
 InitVideo::~InitVideo() {
@@ -137,7 +139,7 @@ InitAL::InitAL() {
        }
 }
 
-InitAL::~InitAL() {
+InitAL::~InitAL() throw(AlutError) {
        if (!alutExit()) {
                throw AlutError(alutGetError(), "alutExit");
        }
@@ -155,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)");
                }
        }