[vlc-commits] hotkeys: show intended rather than current mute status
Rémi Denis-Courmont
git at videolan.org
Tue Oct 22 19:18:06 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Oct 22 20:14:54 2013 +0300| [82752745d3d958d287fc710898b76a0647c12640] | committer: Rémi Denis-Courmont
hotkeys: show intended rather than current mute status
(cherry picked from commit 4dd7f02c1633ab201913a94340194eafa94928a9)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=82752745d3d958d287fc710898b76a0647c12640
---
modules/control/hotkeys.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index e23156e..ec21bec 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -286,18 +286,24 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
break;
}
case ACTIONID_VOL_MUTE:
- if( playlist_MuteToggle( p_playlist ) == 0 )
+ {
+ int mute = playlist_MuteGet( p_playlist );
+ if( mute < 0 )
+ break;
+ mute = !mute;
+ if( playlist_MuteSet( p_playlist, mute ) )
+ break;
+
+ float vol = playlist_VolumeGet( p_playlist );
+ if( mute || vol == 0.f )
{
- float vol = playlist_VolumeGet( p_playlist );
- if( playlist_MuteGet( p_playlist ) > 0 || vol == 0.f )
- {
- ClearChannels( p_intf, p_vout );
- DisplayIcon( p_vout, OSD_MUTE_ICON );
- }
- else
- DisplayVolume( p_intf, p_vout, vol );
+ ClearChannels( p_intf, p_vout );
+ DisplayIcon( p_vout, OSD_MUTE_ICON );
}
+ else
+ DisplayVolume( p_intf, p_vout, vol );
break;
+ }
case ACTIONID_AUDIODEVICE_CYCLE:
{
More information about the vlc-commits
mailing list