update parallel rdp

This commit is contained in:
Logan McNaughton committed 2022-12-20 09:32:55 -05:00
1 parent 06a962d607
commit 08a78f6073
46 files changed
+1896 -631

No files matched your search

+27
View File
@@ -22,6 +22,11 @@
#include "logging.hpp"
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
namespace Util
{
static thread_local LoggingInterface *logging_iface;
@@ -42,4 +47,26 @@ void set_thread_logging_interface(LoggingInterface *iface)
{
logging_iface = iface;
}
#ifdef _WIN32
void debug_output_log(const char *tag, const char *fmt, ...)
{
if (!IsDebuggerPresent())
return;
va_list va;
va_start(va, fmt);
auto len = vsnprintf(nullptr, 0, fmt, va);
if (len > 0)
{
size_t tag_len = strlen(tag);
char *buf = new char[len + tag_len + 1];
memcpy(buf, tag, tag_len);
vsnprintf(buf + tag_len, len + 1, fmt, va);
OutputDebugStringA(buf);
delete[] buf;
}
va_end(va);
}
#endif
}