]> git.sesse.net Git - vlc/commitdiff
* modules/gui/ncurses: fixes the fullscreen hotkey (Closes #164)
authorYoann Peronneau <yoann@videolan.org>
Fri, 27 May 2005 21:14:19 +0000 (21:14 +0000)
committerYoann Peronneau <yoann@videolan.org>
Fri, 27 May 2005 21:14:19 +0000 (21:14 +0000)
modules/gui/ncurses.c

index ff6a29e29917531a74cd0ffa51ead1bb0ca6ae25..a5dfad6ff77d84f3a4996581608df7d8c584c512 100644 (file)
@@ -835,16 +835,31 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
         /* Common control */
         case 'f':
         {
-            vout_thread_t *p_vout;
             if( p_intf->p_sys->p_input )
             {
+                vout_thread_t *p_vout;
                 p_vout = vlc_object_find( p_intf->p_sys->p_input,
                                           VLC_OBJECT_VOUT, FIND_CHILD );
                 if( p_vout )
                 {
-                    p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
+                    var_Get( p_vout, "fullscreen", &val );
+                    val.b_bool = !val.b_bool;
+                    var_Set( p_vout, "fullscreen", val );
                     vlc_object_release( p_vout );
                 }
+                else
+                {
+                    playlist_t *p_playlist;
+                    p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+                                                  FIND_ANYWHERE );
+                    if( p_playlist )
+                    {
+                        var_Get( p_playlist, "fullscreen", &val );
+                        val.b_bool = !val.b_bool;
+                        var_Set( p_playlist, "fullscreen", val );
+                        vlc_object_release( p_playlist );
+                    }
+                }
             }
             return 0;
         }