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

Add integer config item type for RGB values

parent 20692b9c
......@@ -53,6 +53,7 @@ extern "C" {
/* Configuration item types */
#define CONFIG_ITEM_FLOAT 0x20 /* Float option */
#define CONFIG_ITEM_INTEGER 0x40 /* Integer option */
#define CONFIG_ITEM_RGB 0x41 /* RGB color option */
#define CONFIG_ITEM_BOOL 0x60 /* Bool option */
#define CONFIG_ITEM_STRING 0x80 /* String option */
#define CONFIG_ITEM_PASSWORD 0x81 /* Password option (*) */
......
......@@ -345,6 +345,10 @@ enum vlc_module_properties
#define add_integer( name, value, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, value )
#define add_rgb( name, value, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_RGB, name, text, longtext, advc, value ) \
change_integer_range( 0, 0xFFFFFF )
#define add_key( name, value, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_KEY, "global-" name, text, longtext, advc, \
KEY_UNSET ) \
......
......@@ -258,6 +258,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int i_argc,
var_SetString( p_this, psz_name, state.arg );
break;
case CONFIG_ITEM_INTEGER:
case CONFIG_ITEM_RGB:
var_Create( p_this, psz_name, VLC_VAR_INTEGER );
var_SetInteger( p_this, psz_name,
strtoll(state.arg, NULL, 0));
......
......@@ -1545,6 +1545,7 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search )
}
break;
case CONFIG_ITEM_INTEGER:
case CONFIG_ITEM_RGB:
print_help_section( p_parser, p_section, b_color,
b_description );
p_section = NULL;
......
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