Added r_mode -2, uses desktop resolution. Bug #5408. Patch by Andrei Drexler and myself.
This commit is contained in:
parent
a3ae0dc5ef
commit
42d3ff8d1d
2 changed files with 21 additions and 1 deletions
2
README
2
README
|
@ -273,6 +273,8 @@ New cvars
|
||||||
captured using screenshotJPEG
|
captured using screenshotJPEG
|
||||||
r_aviMotionJpegQuality - Controls quality of video capture when
|
r_aviMotionJpegQuality - Controls quality of video capture when
|
||||||
cl_aviMotionJpeg is enabled
|
cl_aviMotionJpeg is enabled
|
||||||
|
r_mode -2 - This new video mode automatically uses the
|
||||||
|
desktop resolution.
|
||||||
|
|
||||||
New commands
|
New commands
|
||||||
video [filename] - start video capture (use with demo command)
|
video [filename] - start video capture (use with demo command)
|
||||||
|
|
|
@ -250,7 +250,25 @@ 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)
|
||||||
|
{
|
||||||
|
// use desktop video resolution
|
||||||
|
if( videoInfo->current_h > 0 )
|
||||||
|
{
|
||||||
|
glConfig.vidWidth = videoInfo->current_w;
|
||||||
|
glConfig.vidHeight = videoInfo->current_h;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
glConfig.vidWidth = 480;
|
||||||
|
glConfig.vidHeight = 640;
|
||||||
|
ri.Printf( PRINT_ALL,
|
||||||
|
"Cannot determine display resolution, assuming 640x480\n" );
|
||||||
|
}
|
||||||
|
|
||||||
|
glConfig.windowAspect = (float)glConfig.vidWidth / (float)glConfig.vidHeight;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue