CommonHostInterface: Fix OSD messages not clearing on shutdown

This commit is contained in:
Connor McLaughlin
2021-05-01 13:37:29 +10:00
parent f39a5dcf5d
commit 44f29da40f
3 changed files with 15 additions and 2 deletions

View File

@ -1149,8 +1149,15 @@ void CommonHostInterface::AddOSDMessage(std::string message, float duration /*=
void CommonHostInterface::ClearOSDMessages()
{
std::unique_lock<std::mutex> lock(m_osd_messages_lock);
m_osd_posted_messages.clear();
{
std::unique_lock<std::mutex> lock(m_osd_messages_lock);
m_osd_posted_messages.clear();
}
m_osd_active_messages.clear();
if (IsFullscreenUIEnabled())
ImGuiFullscreen::ClearNotifications();
}
bool CommonHostInterface::EnumerateOSDMessages(std::function<bool(const std::string&, float)> callback)