engine: platform: sdl2: let system pick better window position if it doesn't fit anywhere

This commit is contained in:
Alibek Omarov
2025-12-08 21:01:13 +05:00
parent 807b5df17b
commit 15f37a301f

View File

@@ -671,9 +671,9 @@ qboolean VID_CreateWindow( int width, int height, window_mode_t window_mode )
if( !RectFitsInAnyDisplay( &rect, display_rects, num_displays ))
{
// Rectangle doesn't fit in any display, center it
xpos = SDL_WINDOWPOS_CENTERED;
ypos = SDL_WINDOWPOS_CENTERED;
Con_Printf( S_ERROR "Rectangle does not fit in any display. Centering window.\n" );
xpos = SDL_WINDOWPOS_UNDEFINED;
ypos = SDL_WINDOWPOS_UNDEFINED;
Con_Printf( S_ERROR "Rectangle does not fit in any display.\n" );
}
else
{