- try to fix fullscreen mode a little better

This commit is contained in:
SoftCoder 2015-10-04 14:03:12 -07:00
parent 32f3729f0a
commit 9e6e4dd6fe

View File

@ -139,12 +139,18 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,
}
}
if(Window::getIsFullScreen()) {
SDL_SetWindowDisplayMode(window,NULL);
}
if(glcontext != NULL) {
if(Window::getIsFullScreen()) {
SDL_SetWindowFullscreen(window,SDL_WINDOW_FULLSCREEN);
}
else {
SDL_SetWindowFullscreen(window,0);
}
}
if(glcontext == NULL) {
glcontext = SDL_GL_CreateContext(window);
@ -284,6 +290,11 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,
//SDL_SetRelativeMouseMode(SDL_TRUE);
SDL_SetRelativeMouseMode(SDL_FALSE);
// if(Window::getIsFullScreen())
// SDL_SetWindowGrab(window, SDL_TRUE);
// else
// SDL_SetWindowGrab(window, SDL_FALSE);
}
}