X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmisc%2Fwin32text.c;h=6318570ffd0a541290394aebdfc0b457119a63d5;hb=fd964450e1eba43b68adbb82a2f684c460f93700;hp=af4568d4150422c9fba8586e49aa8b494323b2f7;hpb=449fd28aaf007c6411251dae9d0dbfdc65b135d1;p=vlc diff --git a/modules/misc/win32text.c b/modules/misc/win32text.c index af4568d415..6318570ffd 100644 --- a/modules/misc/win32text.c +++ b/modules/misc/win32text.c @@ -29,7 +29,8 @@ # include "config.h" #endif -#include +#include +#include #include #include #include @@ -74,22 +75,22 @@ 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") }; vlc_module_begin(); - set_shortname( _("Text renderer")); - set_description( _("Win32 font renderer") ); + set_shortname( N_("Text renderer")); + set_description( N_("Win32 font renderer") ); set_category( CAT_VIDEO ); set_subcategory( SUBCAT_VIDEO_SUBPIC ); @@ -150,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;