Exported DPrintf

Allows for custom debug message handling using the built-in
This commit is contained in:
Boondorl 2024-09-29 17:31:06 -04:00 committed by Rachael Alexanderson
commit 1e96ed31aa
2 changed files with 21 additions and 0 deletions

View file

@ -1162,6 +1162,17 @@ DEFINE_ACTION_FUNCTION(_Console, PrintfEx)
return 0;
}
DEFINE_ACTION_FUNCTION(_Console, DebugPrintf)
{
PARAM_PROLOGUE;
PARAM_INT(debugLevel);
PARAM_VA_POINTER(va_reginfo);
FString s = FStringFormat(VM_ARGS_NAMES, 1);
DPrintf(debugLevel, "%s\n", s.GetChars());
return 0;
}
static void StopAllSounds()
{
soundEngine->StopAllChannels();