mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-27 06:22:27 +00:00
r_mode -2 (desktop resolution)
This commit is contained in:
parent
b16a94f91b
commit
5be4c556f6
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 );
|
||||
|
||||
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" );
|
||||
return RSERR_INVALID_MODE;
|
||||
|
@ -475,6 +483,14 @@ static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qbool
|
|||
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);
|
||||
|
||||
switch ( err )
|
||||
|
|
Loading…
Reference in a new issue