Commit 34c9ee45 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Store the time and length in int, since we use only the seconds count.

parent 0da94177
...@@ -99,13 +99,14 @@ void InputManager::update() ...@@ -99,13 +99,14 @@ void InputManager::update()
} }
/* Update position */ /* Update position */
mtime_t i_length, i_time; int i_length, i_time; /* Int is enough, since we store seconds */
float f_pos; float f_pos;
i_length = var_GetTime( p_input, "length" ) / 1000000; i_length = var_GetTime( p_input, "length" ) / 1000000;
i_time = var_GetTime( p_input, "time") / 1000000; i_time = var_GetTime( p_input, "time") / 1000000;
f_pos = var_GetFloat( p_input, "position" ); f_pos = var_GetFloat( p_input, "position" );
emit positionUpdated( f_pos, i_time, i_length ); emit positionUpdated( f_pos, i_time, i_length );
/* Update Rate */
int i_new_rate = var_GetInteger( p_input, "rate"); int i_new_rate = var_GetInteger( p_input, "rate");
if( i_new_rate != i_rate ) if( i_new_rate != i_rate )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment