engine: platform: sdl: borderless fullscreen windows don't need to restore desktop resolution
* This fixes the case when we switch from windowed to borderless, minimize the window and restore makes it lose it's fullscreen state
This commit is contained in:
parent
7619824d80
commit
70e11cc309
1 changed files with 9 additions and 1 deletions
|
@ -641,9 +641,17 @@ void VID_RestoreScreenResolution( void )
|
|||
switch((window_mode_t)vid_fullscreen.value )
|
||||
{
|
||||
case WINDOW_MODE_WINDOWED:
|
||||
// TODO: this line is from very old SDL video backend
|
||||
// figure out why we need it, because in windowed mode we
|
||||
// always have borders
|
||||
SDL_SetWindowBordered( host.hWnd, SDL_TRUE );
|
||||
break;
|
||||
default:
|
||||
case WINDOW_MODE_BORDERLESS:
|
||||
// in borderless fullscreen we don't change screen resolution, so no-op
|
||||
break;
|
||||
case WINDOW_MODE_FULLSCREEN:
|
||||
// TODO: we might want to not minimize window if current desktop mode
|
||||
// and window mode are the same
|
||||
SDL_MinimizeWindow( host.hWnd );
|
||||
SDL_SetWindowFullscreen( host.hWnd, 0 );
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue