Skip to content

Commit

Permalink
xrECore/ELog: async invoke in ELogCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Mar 24, 2018
1 parent e52b701 commit 35ae230
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/editors/xrECore/Core/ELog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,22 @@ XRECORE_API void ELogCallback(void* context, pcstr message)

if (windowLog)
{

if (isDialog)
{
auto d = gcnew WindowLog::AddMessageDelegate(windowLog, &WindowLog::AddDialogMessage);
windowLog->Invoke(d, gcnew array<Object^> { (int)type, gcnew String(message) });
if (windowLog->InvokeRequired)
windowLog->BeginInvoke(d, gcnew array<Object^> { (int)type, gcnew String(message) });
else
d(type, gcnew String(message));;
}
else
{
auto d = gcnew WindowLog::AddMessageDelegate(windowLog, &WindowLog::AddMessage);
windowLog->Invoke(d, gcnew array<Object^> { (int)type, gcnew String(message) });
if (windowLog->InvokeRequired)
windowLog->BeginInvoke(d, gcnew array<Object^> { (int)type, gcnew String(message) });
else
d(type, gcnew String(message));
}
}
}

0 comments on commit 35ae230

Please sign in to comment.