From c3404fdf376832c940372cfee76281df6376a580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 12 Oct 2024 20:27:58 +0200 Subject: [PATCH] console.lua: don't clear not ours osd messages Note that this still is not perfect, because if osd message is changed, console cannot know about it and would still clear it, but this change make it at least not do it to every message even if console is not used. --- player/lua/console.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/player/lua/console.lua b/player/lua/console.lua index 8576364341..18729ea98b 100644 --- a/player/lua/console.lua +++ b/player/lua/console.lua @@ -414,7 +414,9 @@ end local function print_to_terminal() -- Clear the log after closing the console. if not repl_active then - mp.osd_message('') + if osd_msg_active then + mp.osd_message('') + end osd_msg_active = false return end