Implement some basic logging for windows

This commit is contained in:
jp9000
2014-04-14 04:02:11 -07:00
parent 1388b749c9
commit fa490fa8c4
5 changed files with 53 additions and 24 deletions

View File

@@ -51,7 +51,7 @@ static LRESULT CALLBACK sceneProc(HWND hwnd, UINT message, WPARAM wParam,
return 0;
}
static void do_log(int log_level, const char *msg, va_list args)
static void do_log(int log_level, const char *msg, va_list args, void *param)
{
char bla[4096];
vsnprintf(bla, 4095, msg, args);
@@ -61,6 +61,8 @@ static void do_log(int log_level, const char *msg, va_list args)
if (log_level <= LOG_WARNING)
__debugbreak();
UNUSED_PARAMETER(param);
}
static void CreateOBS(HWND hwnd)
@@ -122,7 +124,7 @@ int WINAPI WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdLine,
int numCmd)
{
HWND hwnd = NULL;
base_set_log_handler(do_log);
base_set_log_handler(do_log, nullptr);
try {
hwnd = CreateTestWindow(instance);