CommonHostInterface: Fix OSD messages not clearing on shutdown
This commit is contained in:
parent
f39a5dcf5d
commit
44f29da40f
|
@ -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)
|
||||
|
|
|
@ -1500,6 +1500,11 @@ void AddNotification(float duration, std::string title, std::string text, std::s
|
|||
s_notifications.push_back(std::move(notif));
|
||||
}
|
||||
|
||||
void ClearNotifications()
|
||||
{
|
||||
s_notifications.clear();
|
||||
}
|
||||
|
||||
void DrawNotifications(ImVec2& position, float spacing)
|
||||
{
|
||||
if (s_notifications.empty())
|
||||
|
|
|
@ -254,5 +254,6 @@ void UpdateBackgroundProgressDialog(const char* str_id, std::string message, s32
|
|||
void CloseBackgroundProgressDialog(const char* str_id);
|
||||
|
||||
void AddNotification(float duration, std::string title, std::string text, std::string image_path);
|
||||
void ClearNotifications();
|
||||
|
||||
} // namespace ImGuiFullscreen
|
||||
|
|
Loading…
Reference in New Issue