Commit b8ae32d9 authored by Erwan Tulou's avatar Erwan Tulou

Qt: fix multiple instances of a singleton if an input is already started

Using THEMIM at this level results in instantiating multiples copies of
what should be a singleton. This is because any preexisting input needs
to be initialized in the constructor of the THEMIN (MainInputManager). This
leads to recursively calling the constructor over and over.

This patch directly calls the underlying functions(no functional change).
parent 600dc54e
......@@ -129,7 +129,7 @@ void InputManager::setInput( input_thread_t *_p_input )
!var_GetFloat( p_input, "start-time" ) &&
!var_GetFloat( p_input, "stop-time" ) )
{
THEMIM->togglePlayPause();
playlist_Pause( THEPL );
if( QMessageBox::question( NULL,
_("Continue playback?"),
......@@ -138,7 +138,7 @@ void InputManager::setInput( input_thread_t *_p_input )
== QMessageBox::Yes )
var_SetTime( p_input, "time", (int64_t)i_time * 1000 );
THEMIM->togglePlayPause();
playlist_Play( THEPL );
}
}
else
......
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