[vlc-commits] commit: Fix "play only" hotkey when playlist is stopped (i.e. no input) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Mar 13 13:37:03 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 13 14:36:26 2010 +0200| [f79d566e54045591f7242f69eac13a91ab6306e6] | committer: Rémi Denis-Courmont 

Fix "play only" hotkey when playlist is stopped (i.e. no input)

This fixes #3377.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f79d566e54045591f7242f69eac13a91ab6306e6
---

 modules/control/hotkeys.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 0d77fab..2fa2b07 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -313,6 +313,19 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
                 playlist_Play( p_playlist );
             break;
 
+        case ACTIONID_PLAY:
+            if( p_input && var_GetFloat( p_input, "rate" ) != 1. )
+                /* Return to normal speed */
+                var_SetFloat( p_input, "rate", 1. );
+            else
+            {
+                ClearChannels( p_intf, p_vout );
+                vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
+                              OSD_PLAY_ICON );
+                playlist_Play( p_playlist );
+            }
+            break;
+
         case ACTIONID_AUDIODEVICE_CYCLE:
         {
             if( !p_aout )
@@ -825,19 +838,6 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
                                 _( "Audio delay %i ms" ),
                                  (int)(i_delay/1000) );
             }
-            else if( i_action == ACTIONID_PLAY )
-            {
-                if( var_GetFloat( p_input, "rate" ) != 1. )
-                    /* Return to normal speed */
-                    var_SetFloat( p_input, "rate", 1. );
-                else
-                {
-                    ClearChannels( p_intf, p_vout );
-                    vout_OSDIcon( VLC_OBJECT( p_intf ), DEFAULT_CHAN,
-                                  OSD_PLAY_ICON );
-                    playlist_Play( p_playlist );
-                }
-            }
             else if( i_action == ACTIONID_MENU_ON )
             {
                 osd_MenuShow( VLC_OBJECT(p_intf) );



More information about the vlc-commits mailing list