mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 07:01:21 +02:00
- try to fix fullscreen mode a little better
This commit is contained in:
@@ -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()) {
|
if(Window::getIsFullScreen()) {
|
||||||
SDL_SetWindowFullscreen(window,SDL_WINDOW_FULLSCREEN);
|
SDL_SetWindowFullscreen(window,SDL_WINDOW_FULLSCREEN);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SDL_SetWindowFullscreen(window,0);
|
SDL_SetWindowFullscreen(window,0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(glcontext == NULL) {
|
if(glcontext == NULL) {
|
||||||
glcontext = SDL_GL_CreateContext(window);
|
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_TRUE);
|
||||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||||
|
|
||||||
|
|
||||||
|
// if(Window::getIsFullScreen())
|
||||||
|
// SDL_SetWindowGrab(window, SDL_TRUE);
|
||||||
|
// else
|
||||||
|
// SDL_SetWindowGrab(window, SDL_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user