Add a growl (http://growl.info/) notification plugin (most of code from msn.c)
[vlc.git] / modules / misc / win32text.c
index a51dc03..aa7cc2b 100644 (file)
@@ -314,13 +314,18 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
 #endif
     if( !psz_string || !*psz_string ) return VLC_EGENERIC;
 
-    i_font_color = __MAX( __MIN( p_region_in->i_text_color, 0xFFFFFF ), 0 );
-    if( i_font_color == 0xFFFFFF ) i_font_color = p_sys->i_font_color;
-
-    i_font_alpha = __MAX( __MIN( p_region_in->i_text_alpha, 255 ), 0 );
-    if( !i_font_alpha ) i_font_alpha = 255 - p_sys->i_font_opacity;
-
-    i_font_size  = __MAX( __MIN( p_region_in->i_text_size, 255 ), 0 );
+    if( p_region_in->p_style )
+    {
+        i_font_color = __MAX( __MIN( p_region_in->p_style->i_font_color, 0xFFFFFF ), 0 );
+        i_font_alpha = __MAX( __MIN( p_region_in->p_style->i_font_alpha, 255 ), 0 );
+        i_font_size  = __MAX( __MIN( p_region_in->p_style->i_font_size, 255 ), 0 );
+    }
+    else
+    {
+        i_font_color = p_sys->i_font_color;
+        i_font_alpha = 255 - p_sys->i_font_opacity;
+        i_font_size = p_sys->i_default_font_size;
+    }
 
     SetFont( p_filter, i_font_size );