mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 23:00:42 +00:00
It's alive!!! 🦄
This commit is contained in:
@@ -11,14 +11,28 @@ struct IGpLogDriver
|
||||
Category_Warning,
|
||||
Category_Error,
|
||||
};
|
||||
|
||||
|
||||
virtual void VPrintf(Category category, const char *fmt, va_list args) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
#ifdef __MACOS__
|
||||
template <typename C, typename F, typename... T>
|
||||
void Printf(C category, F *fmt, T... t);
|
||||
#else
|
||||
void Printf(Category category, const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
//this is temp, but args lose their types for some reason, garbling output
|
||||
#ifdef __MACOS__
|
||||
template <typename C, typename F, typename... T>
|
||||
inline void IGpLogDriver::Printf(C category, F *fmt, T... t)
|
||||
{
|
||||
printf(fmt, t...);
|
||||
printf("\n");
|
||||
}
|
||||
#else
|
||||
inline void IGpLogDriver::Printf(Category category, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
@@ -26,3 +40,4 @@ inline void IGpLogDriver::Printf(Category category, const char *fmt, ...)
|
||||
this->VPrintf(category, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user