[vlc-commits] skins2: remove unneeded brittle hack to avoid callback loop

Rémi Denis-Courmont git at videolan.org
Fri Jul 20 16:58:40 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 20 17:52:45 2012 +0300| [3f169532f637a98cbffcefd8c7b1f1e3a2aa6783] | committer: Rémi Denis-Courmont

skins2: remove unneeded brittle hack to avoid callback loop

A more proper fix was made in 3567c033215cc9a5bbd51590789ba59f90eeba01.

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

 modules/gui/skins2/vars/volume.cpp |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/modules/gui/skins2/vars/volume.cpp b/modules/gui/skins2/vars/volume.cpp
index aa67fdc..dfd449b 100644
--- a/modules/gui/skins2/vars/volume.cpp
+++ b/modules/gui/skins2/vars/volume.cpp
@@ -46,15 +46,9 @@ Volume::Volume( intf_thread_t *pIntf ): VarPercent( pIntf )
 
 void Volume::set( float percentage, bool updateVLC )
 {
-    // Avoid looping forever...
-    if( (int)(get() * AOUT_VOLUME_MAX) !=
-        (int)(percentage * AOUT_VOLUME_MAX) )
-    {
-        VarPercent::set( percentage );
-        if( updateVLC )
-            aout_VolumeSet( getIntf()->p_sys->p_playlist,
-                            (int)(get() * m_volumeMax) );
-    }
+    VarPercent::set( percentage );
+    if( updateVLC )
+        aout_VolumeSet( getIntf()->p_sys->p_playlist, get() * m_volumeMax );
 }
 
 



More information about the vlc-commits mailing list