]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
made cl_capturevideo_ogg 1 by default and saved.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Feb 2009 13:20:14 +0000 (13:20 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 Feb 2009 13:20:14 +0000 (13:20 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8747 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index d301ca65243810634ec014b139a6077a13575b5f..3517e82e74e939881886544479646f19764e109e 100644 (file)
@@ -32,13 +32,13 @@ cvar_t scr_screenshot_jpeg_quality = {CVAR_SAVE, "scr_screenshot_jpeg_quality","
 cvar_t scr_screenshot_gammaboost = {CVAR_SAVE, "scr_screenshot_gammaboost","1", "gamma correction on saved screenshots and videos, 1.0 saves unmodified images"};
 // scr_screenshot_name is defined in fs.c
 cvar_t cl_capturevideo = {0, "cl_capturevideo", "0", "enables saving of video to a .avi file using uncompressed I420 colorspace and PCM audio, note that scr_screenshot_gammaboost affects the brightness of the output)"};
-cvar_t cl_capturevideo_printfps = {0, "cl_capturevideo_printfps", "1", "prints the frames per second captured in capturevideo (is only written to the log file, not to the console, as that would be visible on the video)"};
-cvar_t cl_capturevideo_width = {0, "cl_capturevideo_width", "0", "scales all frames to this resolution before saving the video"};
-cvar_t cl_capturevideo_height = {0, "cl_capturevideo_height", "0", "scales all frames to this resolution before saving the video"};
+cvar_t cl_capturevideo_printfps = {CVAR_SAVE, "cl_capturevideo_printfps", "1", "prints the frames per second captured in capturevideo (is only written to the log file, not to the console, as that would be visible on the video)"};
+cvar_t cl_capturevideo_width = {CVAR_SAVE, "cl_capturevideo_width", "0", "scales all frames to this resolution before saving the video"};
+cvar_t cl_capturevideo_height = {CVAR_SAVE, "cl_capturevideo_height", "0", "scales all frames to this resolution before saving the video"};
 cvar_t cl_capturevideo_realtime = {0, "cl_capturevideo_realtime", "0", "causes video saving to operate in realtime (mostly useful while playing, not while capturing demos), this can produce a much lower quality video due to poor sound/video sync and will abort saving if your machine stalls for over a minute"};
-cvar_t cl_capturevideo_fps = {0, "cl_capturevideo_fps", "30", "how many frames per second to save (29.97 for NTSC, 30 for typical PC video, 15 can be useful)"};
+cvar_t cl_capturevideo_fps = {CVAR_SAVE, "cl_capturevideo_fps", "30", "how many frames per second to save (29.97 for NTSC, 30 for typical PC video, 15 can be useful)"};
 cvar_t cl_capturevideo_number = {CVAR_SAVE, "cl_capturevideo_number", "1", "number to append to video filename, incremented each time a capture begins"};
-cvar_t cl_capturevideo_ogg = {0, "cl_capturevideo_ogg", "0", "save captured video data as Ogg/Vorbis/Theora streams"};
+cvar_t cl_capturevideo_ogg = {CVAR_SAVE, "cl_capturevideo_ogg", "1", "save captured video data as Ogg/Vorbis/Theora streams"};
 cvar_t r_letterbox = {0, "r_letterbox", "0", "reduces vertical height of view to simulate a letterboxed movie effect (can be used by mods for cutscenes)"};
 cvar_t r_stereo_separation = {0, "r_stereo_separation", "4", "separation distance of eyes in the world (negative values are only useful for cross-eyed viewing)"};
 cvar_t r_stereo_sidebyside = {0, "r_stereo_sidebyside", "0", "side by side views for those who can't afford glasses but can afford eye strain (note: use a negative r_stereo_separation if you want cross-eyed viewing)"};
@@ -1019,14 +1019,18 @@ Cr = R *  .500 + G * -.419 + B * -.0813 + 128.;
                cls.capturevideo.yuvnormalizetable[2][i] = 16 + i * (240-16) / 256;
        }
 
-       if (cl_capturevideo_ogg.integer && SCR_CaptureVideo_Ogg_Available())
+       if (cl_capturevideo_ogg.integer)
        {
-               SCR_CaptureVideo_Ogg_BeginVideo();
-       }
-       else
-       {
-               SCR_CaptureVideo_Avi_BeginVideo();
+               if(SCR_CaptureVideo_Ogg_Available())
+               {
+                       SCR_CaptureVideo_Ogg_BeginVideo();
+                       return;
+               }
+               else
+                       Con_Print("cl_capturevideo_ogg: libraries not available. Capturing in AVI instead.\n");
        }
+
+       SCR_CaptureVideo_Avi_BeginVideo();
 }
 
 void SCR_CaptureVideo_EndVideo(void)