mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-05-05 00:25:42 -04:00
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()
|
void CommonHostInterface::ClearOSDMessages()
|
||||||
{
|
{
|
||||||
|
{
|
||||||
std::unique_lock<std::mutex> lock(m_osd_messages_lock);
|
std::unique_lock<std::mutex> lock(m_osd_messages_lock);
|
||||||
m_osd_posted_messages.clear();
|
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)
|
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));
|
s_notifications.push_back(std::move(notif));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClearNotifications()
|
||||||
|
{
|
||||||
|
s_notifications.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void DrawNotifications(ImVec2& position, float spacing)
|
void DrawNotifications(ImVec2& position, float spacing)
|
||||||
{
|
{
|
||||||
if (s_notifications.empty())
|
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 CloseBackgroundProgressDialog(const char* str_id);
|
||||||
|
|
||||||
void AddNotification(float duration, std::string title, std::string text, std::string image_path);
|
void AddNotification(float duration, std::string title, std::string text, std::string image_path);
|
||||||
|
void ClearNotifications();
|
||||||
|
|
||||||
} // namespace ImGuiFullscreen
|
} // namespace ImGuiFullscreen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user