]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
jpeg screenshot support in cl_avidemo recording
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 15 Jul 2003 09:06:38 +0000 (09:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 15 Jul 2003 09:06:38 +0000 (09:06 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3276 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index c1255701451f3a041a25242966ff56469b37dca3..b9a10ed9effdbe992bd2af541e40ce373ad6516e 100644 (file)
@@ -749,8 +749,14 @@ static int cl_avidemo_frame = 0;
 void SCR_CaptureAVIDemo(void)
 {
        char filename[32];
-       sprintf(filename, "dpavi%06d.tga", cl_avidemo_frame);
-       if (SCR_ScreenShot(filename, vid.realx, vid.realy, vid.realwidth, vid.realheight, false))
+       qboolean jpeg = (scr_screenshot_jpeg.integer != 0);
+
+       if (jpeg)
+               sprintf(filename, "dpavi%06d.jpg", cl_avidemo_frame);
+       else
+               sprintf(filename, "dpavi%06d.tga", cl_avidemo_frame);
+
+       if (SCR_ScreenShot(filename, vid.realx, vid.realy, vid.realwidth, vid.realheight, jpeg))
                cl_avidemo_frame++;
        else
        {