Fix audio driver starting in debug mode, add -diagnostics mode

This commit is contained in:
elasota
2020-05-29 21:56:33 -04:00
parent 98afd82d64
commit 611f53ef91
30 changed files with 558 additions and 36 deletions

28
GpCommon/IGpLogDriver.h Normal file
View File

@@ -0,0 +1,28 @@
#pragma once
#include <cstdarg>
#include <stdio.h>
struct IGpLogDriver
{
enum Category
{
Category_Information,
Category_Warning,
Category_Error,
};
virtual void VPrintf(Category category, const char *fmt, va_list args) = 0;
virtual void Shutdown() = 0;
void Printf(Category category, const char *fmt, ...);
};
inline void IGpLogDriver::Printf(Category category, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
this->VPrintf(category, fmt, args);
va_end(args);
}