]> git.sesse.net Git - vlc/blobdiff - modules/gui/beos/Interface.cpp
beos/* : - cleaned the way to mute/unmute
[vlc] / modules / gui / beos / Interface.cpp
index 2a307fd29f1ae140c07cde6b78c0832f06f15023..929cd72d5747414d3a722785a5894af01fa016f7 100644 (file)
@@ -2,7 +2,7 @@
  * intf_beos.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: Interface.cpp,v 1.11 2003/03/12 23:15:03 titer Exp $
+ * $Id: Interface.cpp,v 1.15 2003/06/22 00:40:18 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -85,12 +85,14 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
         free( p_intf->p_sys );
         msg_Err( p_intf, "cannot allocate InterfaceWindow" );
         return( 1 );
-    } else {
+    }
+    else
+    {
+        /* Make the be_app aware the interface has been created */
         BMessage message(INTERFACE_CREATED);
         message.AddPointer("window", p_intf->p_sys->p_window);
         be_app->PostMessage(&message);
     }
-    p_intf->p_sys->i_saved_volume = AOUT_VOLUME_DEFAULT;
     p_intf->p_sys->b_loop = 0;
     p_intf->p_sys->b_mute = 0;
     
@@ -107,8 +109,8 @@ void E_(CloseIntf) ( vlc_object_t *p_this )
     msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
 
     /* Destroy the interface window */
-    p_intf->p_sys->p_window->Lock();
-    p_intf->p_sys->p_window->Quit();
+    if( p_intf->p_sys->p_window->Lock() )
+        p_intf->p_sys->p_window->Quit();
 
     /* Destroy structure */
     delete p_intf->p_sys->p_wrapper;
@@ -123,11 +125,11 @@ static void Run( intf_thread_t *p_intf )
 {
     while( !p_intf->b_die )
     {
-        if( p_intf->p_sys->p_wrapper->UpdateInput() )
-        {
-            /* Manage the slider */
-            p_intf->p_sys->p_window->UpdateInterface();
-        }
+        /* Update VlcWrapper internals (p_input, etc) */
+        p_intf->p_sys->p_wrapper->UpdateInput();
+        
+        /* Manage the slider */
+        p_intf->p_sys->p_window->UpdateInterface();
 
         /* Wait a bit */
         msleep( INTF_IDLE_SLEEP );