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.
This commit is contained in:
Kacper Michajłow 2024-10-12 20:27:58 +02:00
parent 6880178269
commit c3404fdf37
1 changed files with 3 additions and 1 deletions

View File

@ -414,7 +414,9 @@ end
local function print_to_terminal() local function print_to_terminal()
-- Clear the log after closing the console. -- Clear the log after closing the console.
if not repl_active then if not repl_active then
mp.osd_message('') if osd_msg_active then
mp.osd_message('')
end
osd_msg_active = false osd_msg_active = false
return return
end end