diff --git a/reaction/README b/reaction/README index c19e28d7..4b4260c1 100644 --- a/reaction/README +++ b/reaction/README @@ -273,6 +273,8 @@ New cvars captured using screenshotJPEG r_aviMotionJpegQuality - Controls quality of video capture when cl_aviMotionJpeg is enabled + r_mode -2 - This new video mode automatically uses the + desktop resolution. New commands video [filename] - start video capture (use with demo command) diff --git a/reaction/code/sdl/sdl_glimp.c b/reaction/code/sdl/sdl_glimp.c index d4f5afd8..db836526 100644 --- a/reaction/code/sdl/sdl_glimp.c +++ b/reaction/code/sdl/sdl_glimp.c @@ -250,13 +250,23 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder) ri.Printf (PRINT_ALL, "...setting mode %d:", mode ); - if (mode == -2) + if (mode == -2) { - glConfig.vidWidth = videoInfo->current_w; - glConfig.vidHeight = videoInfo->current_h; - glConfig.windowAspect = displayAspect; - fullscreen = qtrue; - noborder = qtrue; + // 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 ) ) {