]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwidgets: don't call aout_VolumeGet so often because it is MIPS intensive.
authorGildas Bazin <gbazin@videolan.org>
Sun, 11 Jun 2006 11:56:39 +0000 (11:56 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 11 Jun 2006 11:56:39 +0000 (11:56 +0000)
modules/gui/wxwidgets/interface.cpp
modules/gui/wxwidgets/interface.hpp

index 3ec4243e91e63aaedd01b60915125eb29282665f..4bb35c30679fd875d610842710c32e8e5fe1b9d0 100644 (file)
@@ -364,6 +364,7 @@ Interface::Interface( intf_thread_t *_p_intf, long style ):
     b_extra = VLC_FALSE;
     extra_frame = 0;
     playlist_manager = 0;
+    i_update_counter = 0;
 
 
     /* Give our interface a nice little icon */
@@ -529,9 +530,11 @@ void Interface::Init()
 void Interface::Update()
 {
     /* Misc updates */
-    ((VLCVolCtrl *)volctrl)->UpdateVolume();
+    if( !(i_update_counter % 10) ) ((VLCVolCtrl *)volctrl)->UpdateVolume();
 
     if( playlist_manager ) playlist_manager->Update();
+
+    i_update_counter++;
 }
 
 void Interface::OnControlEvent( wxCommandEvent& event )
index 89615511c08cbbce23c361d25c880ae159960a40..1f0ea7a3b3ffd109fdd5dc710856b2f10f2379a9 100644 (file)
@@ -164,6 +164,7 @@ namespace wxvlc
         Timer *timer;
         intf_thread_t *p_intf;
 
+        unsigned int i_update_counter;
         int i_old_playing_status;
 
         /* For auto-generated menus */