mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
commit
fc9a90e220
1 changed files with 15 additions and 10 deletions
|
@ -212,7 +212,11 @@ void LogFrame::Task()
|
||||||
|
|
||||||
const LogPacket item = LogBuffer.Pop();
|
const LogPacket item = LogBuffer.Pop();
|
||||||
|
|
||||||
while(m_log.GetItemCount() > max_item_count)
|
wxListView& m_log = this->m_log; //makes m_log capturable by the lambda
|
||||||
|
//queue adding the log message to the gui element in the main thread
|
||||||
|
wxTheApp->GetTopWindow()->GetEventHandler()->CallAfter([item, &m_log]()
|
||||||
|
{
|
||||||
|
while (m_log.GetItemCount() > max_item_count)
|
||||||
{
|
{
|
||||||
m_log.DeleteItem(0);
|
m_log.DeleteItem(0);
|
||||||
wxThread::Yield();
|
wxThread::Yield();
|
||||||
|
@ -223,8 +227,9 @@ void LogFrame::Task()
|
||||||
m_log.InsertItem(cur_item, fmt::FromUTF8(item.m_prefix));
|
m_log.InsertItem(cur_item, fmt::FromUTF8(item.m_prefix));
|
||||||
m_log.SetItem(cur_item, 1, fmt::FromUTF8(item.m_text));
|
m_log.SetItem(cur_item, 1, fmt::FromUTF8(item.m_text));
|
||||||
m_log.SetItemTextColour(cur_item, fmt::FromUTF8(item.m_colour));
|
m_log.SetItemTextColour(cur_item, fmt::FromUTF8(item.m_colour));
|
||||||
m_log.SetColumnWidth(0, -1); // crashes on exit
|
m_log.SetColumnWidth(0, -1);
|
||||||
m_log.SetColumnWidth(1, -1);
|
m_log.SetColumnWidth(1, -1);
|
||||||
|
});
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
::SendMessage((HWND)m_log.GetHWND(), WM_VSCROLL, SB_BOTTOM, 0);
|
::SendMessage((HWND)m_log.GetHWND(), WM_VSCROLL, SB_BOTTOM, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue