- check +logfile explicitly at the start of execution. Due to the custom CVAR rewrite it would get called so late that it'd miss half of the log.
- added version check for Windows 8. I also would have liked to add 8.1 but due to some incredibly stupid changes in the version API it's no longer possible to reliably retrieve the correct Windows version for later builds.
This commit is contained in:
parent
361341e07e
commit
48b926e5b4
4 changed files with 37 additions and 10 deletions
|
|
@ -441,27 +441,33 @@ CCMD (exec)
|
|||
}
|
||||
}
|
||||
|
||||
void execLogfile(const char *fn)
|
||||
{
|
||||
if ((Logfile = fopen(fn, "w")))
|
||||
{
|
||||
const char *timestr = myasctime();
|
||||
Printf("Log started: %s\n", timestr);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("Could not start log\n");
|
||||
}
|
||||
}
|
||||
|
||||
CCMD (logfile)
|
||||
{
|
||||
const char *timestr = myasctime ();
|
||||
|
||||
if (Logfile)
|
||||
{
|
||||
Printf ("Log stopped: %s\n", timestr);
|
||||
const char *timestr = myasctime();
|
||||
Printf("Log stopped: %s\n", timestr);
|
||||
fclose (Logfile);
|
||||
Logfile = NULL;
|
||||
}
|
||||
|
||||
if (argv.argc() >= 2)
|
||||
{
|
||||
if ( (Logfile = fopen (argv[1], "w")) )
|
||||
{
|
||||
Printf ("Log started: %s\n", timestr);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf ("Could not start log\n");
|
||||
}
|
||||
execLogfile(argv[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue