mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-26 22:21:16 +00:00
Adding r_mode -2 back
This commit is contained in:
parent
4d473b2f68
commit
474b074c13
1 changed files with 17 additions and 1 deletions
|
@ -250,7 +250,15 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||||
|
|
||||||
ri.Printf (PRINT_ALL, "...setting mode %d:", mode );
|
ri.Printf (PRINT_ALL, "...setting mode %d:", mode );
|
||||||
|
|
||||||
if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) )
|
if (mode == -2)
|
||||||
|
{
|
||||||
|
glConfig.vidWidth = videoInfo->current_w;
|
||||||
|
glConfig.vidHeight = videoInfo->current_h;
|
||||||
|
glConfig.windowAspect = displayAspect;
|
||||||
|
fullscreen = qtrue;
|
||||||
|
noborder = qtrue;
|
||||||
|
}
|
||||||
|
else if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) )
|
||||||
{
|
{
|
||||||
ri.Printf( PRINT_ALL, " invalid mode\n" );
|
ri.Printf( PRINT_ALL, " invalid mode\n" );
|
||||||
return RSERR_INVALID_MODE;
|
return RSERR_INVALID_MODE;
|
||||||
|
@ -475,6 +483,14 @@ static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qbool
|
||||||
fullscreen = qfalse;
|
fullscreen = qfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!fullscreen && mode == -2)
|
||||||
|
{
|
||||||
|
ri.Printf( PRINT_ALL, "Windowed not allowed with r_mode -2\n");
|
||||||
|
ri.Cvar_Set( "r_fullscreen", "1" );
|
||||||
|
r_fullscreen->modified = qfalse;
|
||||||
|
fullscreen = qtrue;
|
||||||
|
}
|
||||||
|
|
||||||
err = GLimp_SetMode(mode, fullscreen, noborder);
|
err = GLimp_SetMode(mode, fullscreen, noborder);
|
||||||
|
|
||||||
switch ( err )
|
switch ( err )
|
||||||
|
|
Loading…
Reference in a new issue