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 ) case PLAYING_S:
if( p_input->p->i_state == PAUSE_S )
{ {
ControlUnpause( p_input, i_control_date ); ControlUnpause( p_input, i_control_date );
b_force_update = true; b_force_update = true;
} }
else if( val.i_int == PAUSE_S && p_input->p->i_state == PLAYING_S /* && break;
p_input->p->b_can_pause */ ) case PAUSE_S:
if( p_input->p->i_state == PLAYING_S )
{ {
ControlPause( p_input, i_control_date ); ControlPause( p_input, i_control_date );
b_force_update = true; b_force_update = true;
} }
else if( val.i_int == PAUSE_S && !p_input->p->b_can_pause && 0 ) break;
{ default:
b_force_update = true; msg_Err( p_input, "invalid INPUT_CONTROL_SET_STATE" );
/* Correct "state" value */
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