Skip to content
Snippets Groups Projects
Commit 8707b2f4 authored by Marco Z's avatar Marco Z
Browse files

Center window on current monitor during vidmode change

parent 66dc5a87
No related branches found
No related tags found
3 merge requests!488Merge in next and don't billboard papersprites in GL,!415SDL: Center window on current monitor during vidmode change,!398Chat and other multiplayer quality of life improvements.
...@@ -200,7 +200,10 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) ...@@ -200,7 +200,10 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
} }
// Reposition window only in windowed mode // Reposition window only in windowed mode
SDL_SetWindowSize(window, width, height); SDL_SetWindowSize(window, width, height);
SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); SDL_SetWindowPosition(window,
SDL_WINDOWPOS_CENTERED_DISPLAY(SDL_GetWindowDisplayIndex(window)),
SDL_WINDOWPOS_CENTERED_DISPLAY(SDL_GetWindowDisplayIndex(window))
);
} }
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment