X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmisc%2Fwin32text.c;h=6318570ffd0a541290394aebdfc0b457119a63d5;hb=19ed08bd03eb5475b642a59f65fe86ae87202d7a;hp=ded5605d9c14364b7f4bead83c97ddf013a20b82;hpb=13ae40b0efc4f1b1ce205d9a057537047fcab3f4;p=vlc diff --git a/modules/misc/win32text.c b/modules/misc/win32text.c index ded5605d9c..6318570ffd 100644 --- a/modules/misc/win32text.c +++ b/modules/misc/win32text.c @@ -29,7 +29,7 @@ # include "config.h" #endif -#include +#include #include #include #include @@ -75,15 +75,15 @@ static int SetFont( filter_t *, int ); "fonts that will be rendered on the video. If absolute font size is set, "\ "relative size will be overriden." ) -static int pi_sizes[] = { 20, 18, 16, 12, 6 }; -static char *ppsz_sizes_text[] = { N_("Smaller"), N_("Small"), N_("Normal"), - N_("Large"), N_("Larger") }; -static int pi_color_values[] = { +static int const pi_sizes[] = { 20, 18, 16, 12, 6 }; +static char *const ppsz_sizes_text[] = { + N_("Smaller"), N_("Small"), N_("Normal"), N_("Large"), N_("Larger") }; +static const int pi_color_values[] = { 0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000, 0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080, 0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF }; -static char *ppsz_color_descriptions[] = { +static const char *const ppsz_color_descriptions[] = { N_("Black"), N_("Gray"), N_("Silver"), N_("White"), N_("Maroon"), N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Olive"), N_("Green"), N_("Teal"), N_("Lime"), N_("Purple"), N_("Navy"), N_("Blue"), N_("Aqua") }; @@ -151,10 +151,7 @@ static int Create( vlc_object_t *p_this ) /* Allocate structure */ p_filter->p_sys = p_sys = malloc( sizeof( filter_sys_t ) ); if( !p_sys ) - { - msg_Err( p_filter, "out of memory" ); return VLC_ENOMEM; - } p_sys->i_font_size = 0; p_sys->i_display_height = 0;