]> git.sesse.net Git - vlc/blobdiff - modules/control/hotkeys.c
hotkeys: use the return value of var_ToggleBool.
[vlc] / modules / control / hotkeys.c
index d3af55ff28fd2f318ee60556792008b492a9e13e..f50b9952c0188a0b58eb5b82d908db4afe6d572b 100644 (file)
@@ -869,13 +869,12 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
             {
                 if( var_GetBool( p_input, "can-record" ) )
                 {
-                    const bool b_record = !var_GetBool( p_input, "record" );
+                    const bool b_record = var_ToggleBool( p_input, "record" );
 
                     if( b_record )
                         vout_OSDMessage( p_intf, DEFAULT_CHAN, "%s", _("Recording") );
                     else
                         vout_OSDMessage( p_intf, DEFAULT_CHAN, "%s", _("Recording done") );
-                    var_SetBool( p_input, "record", b_record );
                 }
             }
         }