mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 06:25:37 +00:00
Qt: Clear OSD messages on system stop
This commit is contained in:
parent
914f3ad447
commit
547cc4dbf6
|
@ -641,6 +641,7 @@ void QtHostInterface::OnSystemDestroyed()
|
|||
{
|
||||
CommonHostInterface::OnSystemDestroyed();
|
||||
|
||||
ClearOSDMessages();
|
||||
startBackgroundControllerPollTimer();
|
||||
emit emulationStopped();
|
||||
}
|
||||
|
|
|
@ -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 |
|
||||
|
|
|
@ -128,6 +128,7 @@ public:
|
|||
|
||||
/// Adds OSD messages, duration is in seconds.
|
||||
void AddOSDMessage(std::string message, float duration = 2.0f) override;
|
||||
void ClearOSDMessages();
|
||||
|
||||
/// Displays a loading screen with the logo, rendered with ImGui. Use when executing possibly-time-consuming tasks
|
||||
/// such as compiling shaders when starting up.
|
||||
|
|
Loading…
Reference in a new issue