#define VLC_VAR_SETTEXT 0x0014
#define VLC_VAR_GETTEXT 0x0015
+#define VLC_VAR_GETMIN 0x0016
+#define VLC_VAR_GETMAX 0x0017
+#define VLC_VAR_GETSTEP 0x0018
+
#define VLC_VAR_ADDCHOICE 0x0020
#define VLC_VAR_DELCHOICE 0x0021
#define VLC_VAR_CLEARCHOICES 0x0022
p_var->pf_cmp = CmpString;
p_var->pf_dup = DupString;
p_var->pf_free = FreeString;
- p_var->val.psz_string = "";
+ p_var->val.psz_string = strdup( "" );
break;
case VLC_VAR_FLOAT:
p_var->pf_cmp = CmpFloat;
p_var->pf_dup( &p_var->min );
CheckValue( p_var, &p_var->val );
break;
+ case VLC_VAR_GETMIN:
+ if( p_var->i_type & VLC_VAR_HASMIN )
+ {
+ *p_val = p_var->min;
+ }
+ break;
case VLC_VAR_SETMAX:
if( p_var->i_type & VLC_VAR_HASMAX )
{
p_var->pf_dup( &p_var->max );
CheckValue( p_var, &p_var->val );
break;
+ case VLC_VAR_GETMAX:
+ if( p_var->i_type & VLC_VAR_HASMAX )
+ {
+ *p_val = p_var->max;
+ }
+ break;
case VLC_VAR_SETSTEP:
if( p_var->i_type & VLC_VAR_HASSTEP )
{
p_var->pf_dup( &p_var->step );
CheckValue( p_var, &p_var->val );
break;
+ case VLC_VAR_GETSTEP:
+ if( p_var->i_type & VLC_VAR_HASSTEP )
+ {
+ *p_val = p_var->step;
+ }
+ break;
case VLC_VAR_ADDCHOICE:
/* FIXME: the list is sorted, dude. Use something cleverer. */
for( i = p_var->choices.i_count ; i-- ; )
{
vlc_value_t val;
- if( InheritValue( p_this, psz_name, &val, p_var->i_type )
+ if( InheritValue( p_this,
+ p_val2 ? p_val2->psz_string : psz_name,
+ &val, p_var->i_type )
== VLC_SUCCESS )
{
/* Duplicate already done */
case VLC_VAR_MODULE:
case VLC_VAR_FILE:
case VLC_VAR_DIRECTORY:
+ if( val.psz_string ) free( val.psz_string );
val.psz_string = psz_value;
break;