init log before everything else, use WMI to read machine and system info, rtt fixed on Samsung A3, try to create different EGL context config

This commit is contained in:
2017-04-02 15:02:45 +01:00
parent 0dfb458c71
commit b6c9429b89
8 changed files with 241 additions and 24 deletions

View File

@@ -62,6 +62,25 @@ void LogRemote::log(const char* format, ...)
va_end(arglist);
m_mq.Post(std::string(buffer, n));
}
void LogRemote::log(const wchar_t* format, ...)
{
static wchar_t buffer[4096];
va_list arglist;
va_start(arglist, format);
int n = _vsnwprintf(buffer, sizeof(buffer)/sizeof(wchar_t), format, arglist);
va_end(arglist);
std::wstring string_to_convert(buffer, n);
//setup converter
using convert_type = std::codecvt_utf8<wchar_t>;
std::wstring_convert<convert_type, wchar_t> converter;
//use converter (.to_bytes: wstr->str, .from_bytes: str->wstr)
//std::string converted_str = converter.to_bytes(string_to_convert);
m_mq.Post(converter.to_bytes(string_to_convert));
}
LogRemote::~LogRemote()
{
m_running = false;