mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 04:30:43 +00:00
add a "demo_quit" cvar to cause qf to quit automaticly at the end of a
timedemo to make automation of profiling easier
This commit is contained in:
parent
6a94607d9d
commit
1c4c58f1a1
1 changed files with 6 additions and 0 deletions
|
@ -44,6 +44,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "QF/cbuf.h"
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
|
@ -85,6 +86,7 @@ static void CL_TimeFrames_DumpLog (void);
|
||||||
|
|
||||||
cvar_t *demo_speed;
|
cvar_t *demo_speed;
|
||||||
cvar_t *demo_gzip;
|
cvar_t *demo_gzip;
|
||||||
|
cvar_t *demo_quit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
DEMO CODE
|
DEMO CODE
|
||||||
|
@ -1000,6 +1002,8 @@ CL_FinishTimeDemo (void)
|
||||||
}
|
}
|
||||||
free (timedemo_data);
|
free (timedemo_data);
|
||||||
timedemo_data = 0;
|
timedemo_data = 0;
|
||||||
|
if (demo_quit->int_val)
|
||||||
|
Cbuf_InsertText (cl_cbuf, "quit\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1046,6 +1050,8 @@ CL_Demo_Init (void)
|
||||||
demo_speed = Cvar_Get ("demo_speed", "1.0", CVAR_NONE, NULL,
|
demo_speed = Cvar_Get ("demo_speed", "1.0", CVAR_NONE, NULL,
|
||||||
"adjust demo playback speed. 1.0 = normal, "
|
"adjust demo playback speed. 1.0 = normal, "
|
||||||
"< 1 slow-mo, > 1 timelapse");
|
"< 1 slow-mo, > 1 timelapse");
|
||||||
|
demo_quit = Cvar_Get ("demo_quit", "0", CVAR_NONE, NULL,
|
||||||
|
"automaticly quit after a timedemo has finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue