]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/input_manager.cpp
No need to have overlay twice in the preferences
[vlc] / modules / gui / qt4 / input_manager.cpp
index f08fc7e992fc2e679c32f4961e021cbb072b678f..39e9b2f3ce20b43e4af058d591a51641be334d80 100644 (file)
@@ -82,7 +82,11 @@ void InputManager::delInput()
 void InputManager::update()
 {
     /// \todo Emit the signals only if it changed
-    if( !p_input ) return;
+    if( !p_input )
+    {
+        emit nameChanged( "" );
+        return;
+    }
 
     if( p_input->b_dead || p_input->b_die )
     {
@@ -95,13 +99,14 @@ void InputManager::update()
     }
 
     /* Update position */
-    mtime_t i_length, i_time;
+    int i_length, i_time; /* Int is enough, since we store seconds */
     float f_pos;
     i_length = var_GetTime( p_input, "length" ) / 1000000;
     i_time = var_GetTime( p_input, "time") / 1000000;
     f_pos = var_GetFloat( p_input, "position" );
     emit positionUpdated( f_pos, i_time, i_length );
-    
+
+    /* Update Rate */
     int i_new_rate = var_GetInteger( p_input, "rate");
     if( i_new_rate != i_rate )
     {
@@ -162,6 +167,7 @@ void InputManager::update()
         emit nameChanged( text );
         old_name=text;
     }
+
     /* Update playing status */
     var_Get( p_input, "state", &val );
     val.i_int = val.i_int == PAUSE_S ? PAUSE_S : PLAYING_S;