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

Do not pass former callback value to VLC_CONFIG_NAME

parent e5622718
......@@ -120,8 +120,8 @@ enum vlc_module_properties
/**
* Current plugin ABI version
*/
# define MODULE_SYMBOL 1_2_0e
# define MODULE_SUFFIX "__1_2_0e"
# define MODULE_SYMBOL 1_2_0f
# define MODULE_SUFFIX "__1_2_0f"
/*****************************************************************************
* Add a few defines. You do not want to read this section. Really.
......@@ -262,17 +262,17 @@ enum vlc_module_properties
add_typedesc_inner( type, text, longtext ) \
if (advc) vlc_config_set (p_config, VLC_CONFIG_ADVANCED);
#define add_typename_inner( type, name, text, longtext, advc, cb ) \
#define add_typename_inner( type, name, text, longtext, advc ) \
add_typeadv_inner( type, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_NAME, \
(const char *)(name), (vlc_callback_t)(cb));
(const char *)(name));
#define add_string_inner( type, name, text, longtext, advc, cb, v ) \
add_typename_inner( type, name, text, longtext, advc, cb ) \
#define add_string_inner( type, name, text, longtext, advc, v ) \
add_typename_inner( type, name, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_VALUE, (const char *)(v));
#define add_int_inner( type, name, text, longtext, advc, cb, v ) \
add_typename_inner( type, name, text, longtext, advc, cb ) \
#define add_int_inner( type, name, text, longtext, advc, v ) \
add_typename_inner( type, name, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)(v));
......@@ -301,66 +301,64 @@ enum vlc_module_properties
#define add_string( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_STRING, name, text, longtext, advc, \
p_callback, value )
value )
#define add_password( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_PASSWORD, name, text, longtext, advc, \
p_callback, value )
value )
#define add_loadfile( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_LOADFILE, name, text, longtext, advc, \
p_callback, value )
value )
#define add_savefile( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_SAVEFILE, name, text, longtext, advc, \
p_callback, value )
value )
#define add_directory( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_DIRECTORY, name, text, longtext, advc, \
p_callback, value )
value )
#define add_font( name, value, p_callback, text, longtext, advc )\
add_string_inner( CONFIG_ITEM_FONT, name, text, longtext, advc, \
p_callback, value )
value )
#define add_module( name, psz_caps, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE, name, text, longtext, advc, \
p_callback, value ) \
value ) \
vlc_config_set (p_config, VLC_CONFIG_CAPABILITY, (const char *)(psz_caps));
#define add_module_list( name, psz_caps, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST, name, text, longtext, advc, \
p_callback, value ) \
value ) \
vlc_config_set (p_config, VLC_CONFIG_CAPABILITY, (const char *)(psz_caps));
#ifndef __PLUGIN__
#define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, \
p_callback, value ) \
value ) \
change_integer_range (i_subcategory /* gruik */, 0);
#define add_module_list_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, \
advc, p_callback, value ) \
advc, value ) \
change_integer_range (i_subcategory /* gruik */, 0);
#endif
#define add_integer( name, value, p_callback, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, \
p_callback, value )
add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, value )
#define add_key( name, value, p_callback, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_KEY, name, text, longtext, advc, \
p_callback, value ) \
add_int_inner( CONFIG_ITEM_KEY, name, text, longtext, advc, value ) \
add_int_inner( CONFIG_ITEM_KEY, "global-" name, text, longtext, advc, \
p_callback, KEY_UNSET )
KEY_UNSET )
#define add_integer_with_range( name, value, i_min, i_max, p_callback, text, longtext, advc ) \
add_integer( name, value, p_callback, text, longtext, advc ) \
change_integer_range( i_min, i_max )
#define add_float( name, v, p_callback, text, longtext, advc ) \
add_typename_inner( CONFIG_ITEM_FLOAT, name, text, longtext, advc, p_callback ) \
add_typename_inner( CONFIG_ITEM_FLOAT, name, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_VALUE, (double)(v));
#define add_float_with_range( name, value, f_min, f_max, p_callback, text, longtext, advc ) \
......@@ -368,15 +366,14 @@ enum vlc_module_properties
change_float_range( f_min, f_max )
#define add_bool( name, v, p_callback, text, longtext, advc ) \
add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc, \
p_callback ) \
add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc ) \
if (v) vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)true);
/* For removed option */
#define add_obsolete_inner( name, type ) \
add_type_inner( type ) \
vlc_config_set (p_config, VLC_CONFIG_NAME, \
(const char *)(name), (vlc_callback_t)NULL); \
(const char *)(name)); \
vlc_config_set (p_config, VLC_CONFIG_REMOVED);
#define add_obsolete_bool( name ) \
......
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