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

input: fix changing state

parent de2f058a
...@@ -1731,27 +1731,24 @@ static bool Control( input_thread_t *p_input, ...@@ -1731,27 +1731,24 @@ static bool Control( input_thread_t *p_input,
} }
case INPUT_CONTROL_SET_STATE: case INPUT_CONTROL_SET_STATE:
if( val.i_int != PLAYING_S && val.i_int != PAUSE_S ) switch( val.i_int )
msg_Err( p_input, "invalid state in INPUT_CONTROL_SET_STATE" );
else if( p_input->p->i_state == PAUSE_S )
{ {
ControlUnpause( p_input, i_control_date ); case PLAYING_S:
if( p_input->p->i_state == PAUSE_S )
b_force_update = true; {
} ControlUnpause( p_input, i_control_date );
else if( val.i_int == PAUSE_S && p_input->p->i_state == PLAYING_S /* && b_force_update = true;
p_input->p->b_can_pause */ ) }
{ break;
ControlPause( p_input, i_control_date ); case PAUSE_S:
if( p_input->p->i_state == PLAYING_S )
b_force_update = true; {
} ControlPause( p_input, i_control_date );
else if( val.i_int == PAUSE_S && !p_input->p->b_can_pause && 0 ) b_force_update = true;
{ }
b_force_update = true; break;
default:
/* Correct "state" value */ msg_Err( p_input, "invalid INPUT_CONTROL_SET_STATE" );
input_ChangeState( p_input, p_input->p->i_state );
} }
break; break;
......
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