]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
Add missing video capture ifdefs
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 7959dd570c762feb193d399ad7cedf37e0a2a387..a6387bffee57f89a752dd3452370eeec8698b2ab 100644 (file)
--- a/host.c
+++ b/host.c
@@ -925,6 +925,7 @@ void Host_Main(void)
                        R_TimeReport("---");
                        Collision_Cache_NewFrame();
                        R_TimeReport("photoncache");
+#ifdef CONFIG_VIDEO_CAPTURE
                        // decide the simulation time
                        if (cls.capturevideo.active)
                        {
@@ -938,6 +939,10 @@ void Host_Main(void)
                                }
                        }
                        else if (vid_activewindow && cl_maxfps.value >= 1 && !cls.timedemo)
+
+#else
+                       if (vid_activewindow && cl_maxfps.value >= 1 && !cls.timedemo)
+#endif
                        {
                                clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxfps.value);
                                // when running slow, we need to sleep to keep input responsive
@@ -1327,6 +1332,7 @@ static void Host_Init (void)
                Cbuf_Execute(&cmd_client);
        }
 
+#ifdef CONFIG_VIDEO_CAPTURE
 // COMMANDLINEOPTION: Client: -capturedemo <demoname> captures a playdemo and quits
        i = COM_CheckParm("-capturedemo");
        if (i && i + 1 < sys.argc)
@@ -1335,6 +1341,7 @@ static void Host_Init (void)
                Cbuf_AddText(&cmd_client, va(vabuf, sizeof(vabuf), "playdemo %s\ncl_capturevideo 1\n", sys.argv[i + 1]));
                Cbuf_Execute(&cmd_client);
        }
+#endif
 
        if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
        if (!sv.active && !cls.demoplayback && !cls.connect_trying)