optimize locking mechanism for OSD messages, use EnumerateOSDMessages more generally

This commit is contained in:
Jake Stine
2021-02-15 12:54:49 -08:00
parent 0110295f2c
commit c3c4181074
3 changed files with 71 additions and 54 deletions

View File

@ -2712,12 +2712,7 @@ void DrawStatsOverlay()
void DrawOSDMessages()
{
if (!g_settings.display_show_osd_messages)
{
// we still need to remove them from the queue
s_host_interface->EnumerateOSDMessages([](const std::string& message, float time_remaining) { return true; });
return;
}
s_host_interface->AcquirePendingOSDMessages();
ImGui::PushFont(g_large_font);