Qt: Clear OSD messages on system stop

This commit is contained in:
Connor McLaughlin
2020-08-29 22:19:09 +10:00
parent 914f3ad447
commit 547cc4dbf6
3 changed files with 8 additions and 0 deletions

View File

@ -830,6 +830,12 @@ void CommonHostInterface::AddOSDMessage(std::string message, float duration /*=
m_osd_messages.push_back(std::move(msg));
}
void CommonHostInterface::ClearOSDMessages()
{
std::unique_lock<std::mutex> lock(m_osd_messages_lock);
m_osd_messages.clear();
}
void CommonHostInterface::DrawOSDMessages()
{
constexpr ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoInputs |