engine: platform: sdl: write windows position changes even in fullscreen
This commit is contained in:
parent
4975001795
commit
546903ea05
2 changed files with 11 additions and 10 deletions
|
@ -481,8 +481,6 @@ static void SDLash_EventHandler( SDL_Event *event )
|
|||
switch( event->window.event )
|
||||
{
|
||||
case SDL_WINDOWEVENT_MOVED:
|
||||
if( vid_fullscreen.value == WINDOW_MODE_WINDOWED )
|
||||
{
|
||||
char val[32];
|
||||
|
||||
Q_snprintf( val, sizeof( val ), "%d", event->window.data1 );
|
||||
|
@ -491,6 +489,8 @@ static void SDLash_EventHandler( SDL_Event *event )
|
|||
Q_snprintf( val, sizeof( val ), "%d", event->window.data2 );
|
||||
Cvar_DirectSet( &window_ypos, val );
|
||||
|
||||
if ( vid_fullscreen.value == WINDOW_MODE_WINDOWED )
|
||||
{
|
||||
Cvar_DirectSet( &vid_maximized, "0" );
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -824,7 +824,8 @@ qboolean VID_CreateWindow( int width, int height, window_mode_t window_mode )
|
|||
else
|
||||
SetBits( wndFlags, SDL_WINDOW_FULLSCREEN_DESKTOP );
|
||||
SetBits( wndFlags, SDL_WINDOW_BORDERLESS );
|
||||
xpos = ypos = SDL_WINDOWPOS_UNDEFINED;
|
||||
xpos = window_xpos.value;
|
||||
ypos = window_ypos.value;
|
||||
}
|
||||
|
||||
if( !VID_CreateWindowWithSafeGL( wndname, xpos, ypos, width, height, wndFlags ))
|
||||
|
|
Loading…
Add table
Reference in a new issue