Browse Source

make debug messages log to stdout on non-windows operating systems

jp9000 12 years ago
parent
commit
221ed7d92b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      obs/obs-app.cpp

+ 3 - 1
obs/obs-app.cpp

@@ -39,15 +39,17 @@ OBSAppBase::~OBSAppBase()
 
 
 static void do_log(enum log_type type, const char *msg, va_list args)
 static void do_log(enum log_type type, const char *msg, va_list args)
 {
 {
+#ifdef _WIN32
 	char bla[4096];
 	char bla[4096];
 	vsnprintf(bla, 4095, msg, args);
 	vsnprintf(bla, 4095, msg, args);
 
 
-#ifdef _WIN32
 	OutputDebugStringA(bla);
 	OutputDebugStringA(bla);
 	OutputDebugStringA("\n");
 	OutputDebugStringA("\n");
 
 
 	if (type >= LOG_WARNING)
 	if (type >= LOG_WARNING)
 		__debugbreak();
 		__debugbreak();
+#else
+	vprintf(msg, args);
 #endif
 #endif
 }
 }