Commit ed2a403f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove redumdant b_play code

parent 4d50ccca
......@@ -54,7 +54,6 @@ struct intf_thread_t
VLC_COMMON_MEMBERS
/* Thread properties and locks */
bool b_play;
bool b_should_run_on_first_thread;
/* Specific interfaces */
......
......@@ -108,7 +108,6 @@ int OpenIntf ( vlc_object_t *p_this )
p_intf->p_sys->o_sendport = [[NSPort port] retain];
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
p_intf->b_play = true;
p_intf->pf_run = Run;
p_intf->b_should_run_on_first_thread = true;
......@@ -560,11 +559,6 @@ static VLCMain *_o_sharedMainInstance = nil;
p_playlist = pl_Yield( p_intf );
/* Check if we need to start playing */
if( p_intf->b_play )
{
playlist_Control( p_playlist, PLAYLIST_PLAY, false );
}
var_Create( p_playlist, "fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
val.b_bool = false;
......
......@@ -235,9 +235,6 @@ static int Open( vlc_object_t *p_this )
p_intf->p_sys->p_playlist = pl_Yield( p_intf );
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
/* We support play on start */
p_intf->b_play = true;
return VLC_SUCCESS;
}
......@@ -353,12 +350,6 @@ static void Init( intf_thread_t *p_intf )
app->installTranslator( &qtTranslator );
#endif //ENABLE_NLS
/* Start playing if needed */
if( !p_intf->pf_show_dialog && p_intf->b_play )
{
playlist_Control( THEPL, PLAYLIST_PLAY, false );
}
/* Explain to the core how to show a dialog :D */
p_intf->pf_show_dialog = ShowDialog;
......
......@@ -163,9 +163,6 @@ static int Open( vlc_object_t *p_this )
Dialogs::instance( p_intf );
ThemeRepository::instance( p_intf );
// We support play on start
p_intf->b_play = true;
return( VLC_SUCCESS );
}
......@@ -252,19 +249,6 @@ static void Run( intf_thread_t *p_intf )
// Get the instance of OSLoop
OSLoop *loop = OSFactory::instance( p_intf )->getOSLoop();
// Check if we need to start playing
if( p_intf->b_play )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
playlist_Control( p_playlist, PLAYLIST_PLAY, false );
vlc_object_release( p_playlist );
}
}
// Enter the main event loop
loop->run();
......
......@@ -253,19 +253,6 @@ static void MainLoop( intf_thread_t *p_intf )
/* OK, initialization is over */
vlc_thread_ready( p_intf );
/* Check if we need to start playing */
if( !p_intf->pf_show_dialog && p_intf->b_play )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
playlist_Play( p_playlist );
vlc_object_release( p_playlist );
}
}
// Main message loop
while( GetMessage( &msg, NULL, 0, 0 ) > 0 )
{
......
......@@ -208,9 +208,6 @@ static int Open( vlc_object_t *p_this )
p_intf->pf_show_dialog = NULL;
/* We support play on start */
p_intf->b_play = true;
p_intf->p_sys->b_video_autosize =
config_GetInt( p_intf, "wx-autosize" );
......@@ -390,19 +387,6 @@ bool Instance::OnInit()
/* OK, initialization is over */
vlc_thread_ready( p_intf );
/* Check if we need to start playing */
if( !p_intf->pf_show_dialog && p_intf->b_play )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
playlist_Control( p_playlist, PLAYLIST_PLAY, false );
vlc_object_release( p_playlist );
}
}
/* Return TRUE to tell program to continue (FALSE would terminate) */
return TRUE;
}
......
......@@ -99,7 +99,6 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module )
p_intf->pf_request_window = NULL;
p_intf->pf_release_window = NULL;
p_intf->pf_control_window = NULL;
p_intf->b_play = false;
p_intf->b_interaction = false;
p_intf->b_should_run_on_first_thread = false;
......@@ -224,9 +223,6 @@ static void RunInterface( intf_thread_t *p_intf )
vlc_object_unlock( p_intf );
}
/* Reset play on start status */
p_intf->b_play = false;
if( !p_intf->psz_switch_intf )
{
break;
......
......@@ -1133,7 +1133,6 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module )
}
/* Try to run the interface */
p_intf->b_play = false; /* TODO: remove b_play completely */
i_err = intf_RunThread( p_intf );
if( i_err )
{
......
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