]> git.sesse.net Git - vlc/commitdiff
Fix "play only" hotkey when playlist is stopped (i.e. no input)
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 13 Mar 2010 12:36:26 +0000 (14:36 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 13 Mar 2010 12:36:26 +0000 (14:36 +0200)
This fixes #3377.

modules/control/hotkeys.c

index 0d77fab74a68a4c0b5e168cf9aa848c322562c71..2fa2b0755334a2eceb0d58fbfb83d654014b298f 100644 (file)
@@ -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) );