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

variables: set VLC_VAR_HASCHOICE in var_Type() if there are choices

This allows adding choices as mere suggestions rather than strict set
of choices (just don´t set VLC_VAR_HASCHOICE in var_Create()).
parent 2a50f021
...@@ -672,8 +672,11 @@ int var_Type( vlc_object_t *p_this, const char *psz_name ) ...@@ -672,8 +672,11 @@ int var_Type( vlc_object_t *p_this, const char *psz_name )
p_var = Lookup( p_this, psz_name ); p_var = Lookup( p_this, psz_name );
if( p_var != NULL ) if( p_var != NULL )
{
i_type = p_var->i_type; i_type = p_var->i_type;
if( p_var->choices.i_count > 0 )
i_type |= VLC_VAR_HASCHOICE;
}
vlc_mutex_unlock( &p_priv->var_lock ); vlc_mutex_unlock( &p_priv->var_lock );
return i_type; return i_type;
......
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