Commit c628e724 authored by François Cartegnie's avatar François Cartegnie 🤞

input: event: don't set non-existing list variable

This reverts commit 7ddd2f34.
parent 9b428d68
......@@ -264,29 +264,30 @@ static const char *GetEsVarName( int i_cat )
return "video-es";
case AUDIO_ES:
return "audio-es";
case NAV_ES:
return "nav-es";
default:
assert( i_cat == SPU_ES );
case SPU_ES:
return "spu-es";
default:
return NULL;
}
}
void input_SendEventEsAdd( input_thread_t *p_input, int i_cat, int i_id, const char *psz_text )
{
if( i_cat != UNKNOWN_ES )
VarListAdd( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES,
i_id, psz_text );
const char *psz_varname = GetEsVarName( i_cat );
if( psz_varname )
VarListAdd( p_input, psz_varname, INPUT_EVENT_ES, i_id, psz_text );
}
void input_SendEventEsDel( input_thread_t *p_input, int i_cat, int i_id )
{
if( i_cat != UNKNOWN_ES )
VarListDel( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES, i_id );
const char *psz_varname = GetEsVarName( i_cat );
if( psz_varname )
VarListDel( p_input, psz_varname, INPUT_EVENT_ES, i_id );
}
/* i_id == -1 will unselect */
void input_SendEventEsSelect( input_thread_t *p_input, int i_cat, int i_id )
{
if( i_cat != UNKNOWN_ES )
VarListSelect( p_input, GetEsVarName( i_cat ), INPUT_EVENT_ES, i_id );
const char *psz_varname = GetEsVarName( i_cat );
if( psz_varname )
VarListSelect( p_input, psz_varname, INPUT_EVENT_ES, i_id );
}
void input_SendEventTeletextAdd( input_thread_t *p_input,
......
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