CommonHostInterface: Filter OSD messages in acquire for disabled case

This commit is contained in:
Connor McLaughlin 2021-02-23 17:23:40 +10:00
parent a9cf6cdc91
commit 175abd4914
1 changed files with 3 additions and 7 deletions

View File

@ -957,12 +957,6 @@ bool CommonHostInterface::EnumerateOSDMessages(std::function<bool(const std::str
continue; continue;
} }
if (!g_settings.display_show_osd_messages)
{
++iter;
continue;
}
if (callback && !callback(iter->text, time_remaining)) if (callback && !callback(iter->text, time_remaining))
return false; return false;
@ -994,7 +988,9 @@ void CommonHostInterface::AcquirePendingOSDMessages()
if (m_osd_posted_messages.empty()) if (m_osd_posted_messages.empty())
break; break;
m_osd_active_messages.push_back(std::move(m_osd_posted_messages.front())); if (g_settings.display_show_osd_messages)
m_osd_active_messages.push_back(std::move(m_osd_posted_messages.front()));
m_osd_posted_messages.pop_front(); m_osd_posted_messages.pop_front();
// somewhat arbitrary hard cap on # of messages. This might be unnecessarily paranoid. If something is // somewhat arbitrary hard cap on # of messages. This might be unnecessarily paranoid. If something is