mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-14 00:10:39 +00:00
Don't run vid_restart when "resized" to current size
This commit is contained in:
parent
c4f5176af4
commit
148603c951
1 changed files with 13 additions and 5 deletions
|
@ -849,11 +849,19 @@ static void IN_ProcessEvents( void )
|
||||||
{
|
{
|
||||||
case SDL_WINDOWEVENT_RESIZED:
|
case SDL_WINDOWEVENT_RESIZED:
|
||||||
{
|
{
|
||||||
char width[32], height[32];
|
int width, height;
|
||||||
Com_sprintf( width, sizeof( width ), "%d", e.window.data1 );
|
|
||||||
Com_sprintf( height, sizeof( height ), "%d", e.window.data2 );
|
width = e.window.data1;
|
||||||
Cvar_Set( "r_customwidth", width );
|
height = e.window.data2;
|
||||||
Cvar_Set( "r_customheight", height );
|
|
||||||
|
// check if size actually changed
|
||||||
|
if( cls.glconfig.vidWidth == width && cls.glconfig.vidHeight == height )
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Cvar_SetValue( "r_customwidth", width );
|
||||||
|
Cvar_SetValue( "r_customheight", height );
|
||||||
Cvar_Set( "r_mode", "-1" );
|
Cvar_Set( "r_mode", "-1" );
|
||||||
|
|
||||||
// Wait until user stops dragging for 1 second, so
|
// Wait until user stops dragging for 1 second, so
|
||||||
|
|
Loading…
Reference in a new issue