- try to force focus on main window at startup

This commit is contained in:
Mark Vejvoda 2012-11-11 05:31:11 +00:00
parent 1966710628
commit 847f97a048
2 changed files with 7 additions and 2 deletions

View File

@ -502,6 +502,9 @@ Intro::Intro(Program *program):
}
}
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
renderer.swapBuffers();
}
//test = NULL;
//Shared::Graphics::md5::initMD5OpenGL(data_path + "data/core/shaders/");
//md5Test = Shared::Graphics::md5::getMD5ObjectFromLoaderScript("/home/softcoder/Code/megaglest/trunk/mk/linux/mydata/test/mv1/mv1.loader");

View File

@ -213,7 +213,6 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,
}
#endif
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
SDL_WM_GrabInput(SDL_GRAB_OFF);
@ -248,7 +247,10 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,
if (SDL_SetGamma(gammaValue, gammaValue, gammaValue) < 0) {
printf("WARNING, SDL_SetGamma failed using value %f [%s]\n", gammaValue,SDL_GetError());
}
}
}
SDL_WM_GrabInput(SDL_GRAB_ON);
SDL_WM_GrabInput(SDL_GRAB_OFF);
}
}