Commit 4dd7f02c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

hotkeys: show intended rather than current mute status

parent c62e5319
...@@ -286,18 +286,24 @@ static int PutAction( intf_thread_t *p_intf, int i_action ) ...@@ -286,18 +286,24 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
break; break;
} }
case ACTIONID_VOL_MUTE: 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 ); float vol = playlist_VolumeGet( p_playlist );
if( playlist_MuteGet( p_playlist ) > 0 || vol == 0.f ) if( mute || vol == 0.f )
{ {
ClearChannels( p_intf, p_vout ); ClearChannels( p_intf, p_vout );
DisplayIcon( p_vout, OSD_MUTE_ICON ); DisplayIcon( p_vout, OSD_MUTE_ICON );
} }
else else
DisplayVolume( p_intf, p_vout, vol ); DisplayVolume( p_intf, p_vout, vol );
}
break; break;
}
case ACTIONID_AUDIODEVICE_CYCLE: case ACTIONID_AUDIODEVICE_CYCLE:
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment