summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-11 21:34:15 +0200
committerwm4 <wm4@nowhere>2014-10-11 21:35:08 +0200
commitb9077214cf63f6103deed12c3047388f5dbb3fc4 (patch)
tree7b570ddac22c2a97ad2c90eb82c9a3bdcc0af6a3 /player/command.c
parenta3bf75279e806084ee1235e6a5bb5b9fdd8c7095 (diff)
downloadmpv-b9077214cf63f6103deed12c3047388f5dbb3fc4.tar.bz2
mpv-b9077214cf63f6103deed12c3047388f5dbb3fc4.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
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index da2e7de125..6daa0555c7 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3067,7 +3067,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" },