[vlc-devel] commit: gestures: cleaning. ( Rémi Duraffort )

git version control git at videolan.org
Fri Feb 27 19:24:47 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Feb 27 18:30:55 2009 +0100| [2dfd048ed72af838b8ac11dd19102a68e23dd83d] | committer: Rémi Duraffort 

gestures: cleaning.

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

 modules/control/gestures.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/modules/control/gestures.c b/modules/control/gestures.c
index fb0fa76..b556bf9 100644
--- a/modules/control/gestures.c
+++ b/modules/control/gestures.c
@@ -385,13 +385,16 @@ static void RunIntf( intf_thread_t *p_intf )
                     vlc_object_release( p_input );
                 }
                 break;
+
             case GESTURE(UP,LEFT,NONE,NONE):
                 if (p_intf->p_sys->p_vout )
                 {
-                    ((vout_thread_t *)p_intf->p_sys->p_vout)->i_changes |=
-                        VOUT_FULLSCREEN_CHANGE;
+                    var_Get( p_intf->p_sys->p_vout, "fullscreen", &val );
+                    val.b_bool = !val.b_bool;
+                    var_Set( p_intf->p_sys->p_vout, "fullscreen", val );
                 }
                 break;
+
             case GESTURE(DOWN,LEFT,NONE,NONE):
                 /* FIXME: Should close the vout!"*/
                 libvlc_Quit( p_intf->p_libvlc );
@@ -423,8 +426,14 @@ static void RunIntf( intf_thread_t *p_intf )
 
         if( p_intf->p_sys->p_vout == NULL )
         {
-            p_intf->p_sys->p_vout = vlc_object_find( p_intf,
-                                      VLC_OBJECT_VOUT, FIND_ANYWHERE );
+            p_playlist = pl_Hold( p_intf );
+            p_input = playlist_CurrentInput( p_playlist );
+            pl_Release( p_intf );
+            if( p_input )
+            {
+                p_intf->p_sys->p_vout = input_GetVout( p_input );
+                vlc_object_release( p_input );
+            }
             if( p_intf->p_sys->p_vout )
             {
                 var_AddCallback( p_intf->p_sys->p_vout, "mouse-moved",




More information about the vlc-devel mailing list