mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-11 05:51:53 +00:00
Avoid inaccessible window title bar.
Use SDL_WINDOWPOS_UNDEFINED instead of (0, 0) as initial window position.
This commit is contained in:
parent
7c67c11540
commit
4ade508a34
@ -543,7 +543,9 @@ int CVideo::setMode( int x, int y, int bits_per_pixel, int flags )
|
|||||||
fullScreen = (flags & FULL_SCREEN) != 0;
|
fullScreen = (flags & FULL_SCREEN) != 0;
|
||||||
|
|
||||||
if(!window) {
|
if(!window) {
|
||||||
window = new sdl::twindow("", 0, 0, x, y, flags, SDL_RENDERER_SOFTWARE);
|
// SDL_WINDOWPOS_UNDEFINED allows SDL to centre the window in the display instead of using a fixed initial position.
|
||||||
|
// Note that x and y in this particular case refer to width and height of the window, not co-ordinates.
|
||||||
|
window = new sdl::twindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, x, y, flags, SDL_RENDERER_SOFTWARE);
|
||||||
} else {
|
} else {
|
||||||
if(fullScreen) {
|
if(fullScreen) {
|
||||||
window->full_screen();
|
window->full_screen();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user