]> git.sesse.net Git - vlc/commitdiff
Added var_InheritBool.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 3 Jan 2010 21:14:18 +0000 (22:14 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 5 Jan 2010 20:06:31 +0000 (21:06 +0100)
include/vlc_variables.h

index 8f92a7de49ae69de6e83dcf35eb0e657382d8c1d..2f170fe98ec57212415f6fdd068a907d735c9e77 100644 (file)
@@ -719,6 +719,18 @@ static inline int __var_ToggleBool( vlc_object_t *p_obj, const char *psz_name )
  */
 #define var_ToggleBool(a,b) __var_ToggleBool( VLC_OBJECT(a),b )
 
+
+LIBVLC_USED
+static inline bool var_InheritBool( vlc_object_t *obj, const char *name )
+{
+    vlc_value_t val;
+
+    if( var_Inherit( obj, name, VLC_VAR_BOOL, &val ) )
+        val.b_bool = false;
+    return val.b_bool;
+}
+#define var_InheritBool(o, n) var_InheritBool(VLC_OBJECT(o), n)
+
 LIBVLC_USED
 static inline int var_InheritInteger( vlc_object_t *obj, const char *name )
 {