mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-03 23:42:07 +00:00
Add assert command to test whether assertions are enabled at runtime
This commit is contained in:
parent
a77234233b
commit
2e3ed95338
1 changed files with 11 additions and 0 deletions
11
src/d_main.c
11
src/d_main.c
|
|
@ -1196,6 +1196,15 @@ const char *D_GetFancyBranchName(void)
|
||||||
return compbranch;
|
return compbranch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Command_assert(void)
|
||||||
|
{
|
||||||
|
#if !defined(NDEBUG) || defined(PARANOIA)
|
||||||
|
CONS_Printf("Yes, assertions are enabled.\n");
|
||||||
|
#else
|
||||||
|
CONS_Printf("No, ssertions are NOT enabled.\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// D_SRB2Main
|
// D_SRB2Main
|
||||||
//
|
//
|
||||||
|
|
@ -1387,6 +1396,8 @@ void D_SRB2Main(void)
|
||||||
// Do this up here so that WADs loaded through the command line can use ExecCfg
|
// Do this up here so that WADs loaded through the command line can use ExecCfg
|
||||||
COM_Init();
|
COM_Init();
|
||||||
|
|
||||||
|
COM_AddCommand("assert", Command_assert);
|
||||||
|
|
||||||
#ifndef TESTERS
|
#ifndef TESTERS
|
||||||
// add any files specified on the command line with -file wadfile
|
// add any files specified on the command line with -file wadfile
|
||||||
// to the wad list
|
// to the wad list
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue