X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Finit.cpp;h=fea5653cf1cf6499bb378b22286169cf2c15fff8;hb=fcdce6d72f97d4749c0f120e22e8be00e88ebc6e;hp=f4bcd01f45a230c4a1d928f967f60c0ff494ba19;hpb=86d82a0b535e88d841a927f3574cc9bd228f55fe;p=blank.git diff --git a/src/app/init.cpp b/src/app/init.cpp index f4bcd01..fea5653 100644 --- a/src/app/init.cpp +++ b/src/app/init.cpp @@ -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() { @@ -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)"); } }