mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Fix audio driver starting in debug mode, add -diagnostics mode
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "EGpAudioDriverType.h"
|
||||
|
||||
struct IGpAudioDriver;
|
||||
struct IGpLogDriver;
|
||||
|
||||
struct GpAudioDriverProperties
|
||||
{
|
||||
@@ -10,4 +11,6 @@ struct GpAudioDriverProperties
|
||||
|
||||
unsigned int m_sampleRate;
|
||||
bool m_debug;
|
||||
|
||||
IGpLogDriver *m_logger;
|
||||
};
|
||||
|
@@ -8,6 +8,7 @@
|
||||
struct IGpDisplayDriver;
|
||||
struct IGpFiber;
|
||||
struct IGpVOSEventQueue;
|
||||
struct IGpLogDriver;
|
||||
|
||||
struct GpDisplayDriverProperties
|
||||
{
|
||||
@@ -39,4 +40,5 @@ struct GpDisplayDriverProperties
|
||||
void *m_adjustRequestedResolutionFuncContext;
|
||||
|
||||
IGpVOSEventQueue *m_eventQueue;
|
||||
IGpLogDriver *m_logger;
|
||||
};
|
||||
|
@@ -19,7 +19,9 @@ struct GpWindowsGlobals
|
||||
{
|
||||
HINSTANCE m_hInstance;
|
||||
HINSTANCE m_hPrevInstance;
|
||||
LPCSTR m_cmdLine;
|
||||
LPCWSTR m_cmdLine;
|
||||
int m_cmdLineArgc;
|
||||
LPWSTR *m_cmdLineArgv;
|
||||
LPCWSTR m_baseDir;
|
||||
HWND m_hwnd;
|
||||
HICON m_hIcon;
|
||||
|
28
GpCommon/IGpLogDriver.h
Normal file
28
GpCommon/IGpLogDriver.h
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user