summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-11 21:34:15 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-10-12 12:43:05 +0200
commit08d144138b23044465d043dda5177dfe3e97e9e0 (patch)
tree4bc3b54f65d03a9b421d52a506a4a5473193d8ce
parent58b511d947d917db899998632c1e66c6488d43d2 (diff)
downloadmpv-08d144138b23044465d043dda5177dfe3e97e9e0.tar.bz2
mpv-08d144138b23044465d043dda5177dfe3e97e9e0.tar.xz
command: don't display non-sense if volume is unavailable
Showed "Volume: (unavailable)%". That was dumb. The message string is now a bit convoluted; mostly because the property expand syntax can't do "if-else", just "if". CC: @mpv-player/stable
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 564ac38a39..78b2bf3cfb 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3024,7 +3024,7 @@ static const struct property_osd_display {
{ "clock", "Clock" },
// audio
{ "volume", "Volume",
- .msg = "Volume: ${volume}% ${?mute==yes:(Muted)}",
+ .msg = "Volume: ${?volume:${volume}% ${?mute==yes:(Muted)}}${!volume:${volume}}",
.osd_progbar = OSD_VOLUME },
{ "mute", "Mute" },
{ "audio-delay", "A-V delay" },