summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2023-12-05 23:18:04 +0100
committersfan5 <sfan5@live.de>2023-12-06 10:59:40 +0100
commitdf166997ae6cc10b444b00f664e89b828140bc68 (patch)
tree49a71eb62f778edf6d7f0442312a460b301517d2 /player/lua
parent562450f59e4b1c3895c0df7dbc7981fc2085792e (diff)
downloadmpv-df166997ae6cc10b444b00f664e89b828140bc68.tar.bz2
mpv-df166997ae6cc10b444b00f664e89b828140bc68.tar.xz
console.lua: simplify the condition to print to the terminal
This was a simpler fix to not print the console log to the OSD while switching VO.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/console.lua11
1 files changed, 3 insertions, 8 deletions
diff --git a/player/lua/console.lua b/player/lua/console.lua
index 44e943635e..45e576b9bb 100644
--- a/player/lua/console.lua
+++ b/player/lua/console.lua
@@ -257,14 +257,9 @@ end
function update()
pending_update = false
- -- Print to the terminal when there is no VO. Check both vo-configured so
- -- it works with --force-window --idle and no video tracks, and whether
- -- there is a video track so that the condition doesn't become true while
- -- switching VO at runtime, making mp.osd_message() print to the VO's OSD.
- -- This issue does not happen when switching VO without any video track
- -- regardless of the condition used.
- if not mp.get_property_native('vo-configured')
- and not mp.get_property('current-tracks/video') then
+ -- Unlike vo-configured, current-vo doesn't become falsy while switching VO,
+ -- which would print the log to the OSD.
+ if not mp.get_property('current-vo') then
print_to_terminal()
return
end