Commit 68a7c725 authored by Eric Petit's avatar Eric Petit

beos/InterfaceWindow.cpp: fixed a deadlock + pause button not responding

parent f5a7e27a
......@@ -441,25 +441,25 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
break;
case START_PLAYBACK:
/* starts playing in normal mode */
case PAUSE_PLAYBACK:
if( p_input )
{
if( var_GetInteger( p_input, "state" ) == PAUSE_S )
{
if( p_playlist )
vlc_value_t val;
val.i_int = PLAYING_S;
if( p_input )
{
playlist_Play( p_playlist );
var_Get( p_input, "state", &val );
}
if( p_input && val.i_int != PAUSE_S )
{
val.i_int = PAUSE_S;
var_Set( p_input, "state", val );
}
else
{
var_SetInteger( p_input, "state", PAUSE_S );
}
playlist_Play( p_playlist );
}
break;
}
case HEIGHTH_PLAY:
if( p_input )
{
......@@ -714,11 +714,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
if( b_remove && p_playlist )
{
/* Empty playlist */
while( p_playlist->i_size > 0 )
{
playlist_Delete( p_playlist, 0 );
}
playlist_Clear( p_playlist );
}
entry_ref ref;
......@@ -858,7 +854,7 @@ void InterfaceWindow::UpdateInterface()
_SetMenusEnabled( false );
if( !p_playlist || p_playlist->i_size <= 0 )
if( !playlist_IsEmpty( p_playlist ) )
{
p_mediaControl->SetProgress( 0 );
......
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