X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fggi.c;h=b3ae57485402f227ed67e8304c615bc1559de1db;hb=924bda6286af1120d86a3b70f98aa06e1c7106ae;hp=37a98ee1178729ba950b160271298502c416d845;hpb=9025fab9931ecc35fe247b0a63d0cea166dee88d;p=vlc diff --git a/modules/video_output/ggi.c b/modules/video_output/ggi.c index 37a98ee117..b3ae574854 100644 --- a/modules/video_output/ggi.c +++ b/modules/video_output/ggi.c @@ -25,13 +25,16 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include /* malloc(), free() */ -#include #include /* ENOMEM */ #include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include #include #include @@ -60,7 +63,7 @@ static void SetPalette ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * "environment variable.") vlc_module_begin(); - add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE ); + add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true ); set_description( "General Graphics Interface video output" ); set_capability( "video output", 30 ); set_callbacks( Create, Destroy ); @@ -84,7 +87,7 @@ struct vout_sys_t ggi_directbuffer * pp_buffer[2]; /* buffers */ int i_index; - vlc_bool_t b_must_acquire; /* must be acquired before writing */ + bool b_must_acquire; /* must be acquired before writing */ }; /***************************************************************************** @@ -101,10 +104,7 @@ static int Create( vlc_object_t *p_this ) /* Allocate structure */ p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) - { - msg_Err( p_vout, "out of memory" ); return( 1 ); - } /* Open and initialize device */ if( OpenDisplay( p_vout ) ) @@ -306,7 +306,7 @@ static int Manage( vout_thread_t *p_vout ) switch( event.pbutton.button ) { case GII_PBUTTON_LEFT: - val.b_bool = VLC_TRUE; + val.b_bool = true; var_Set( p_vout, "mouse-clicked", val ); break; @@ -393,7 +393,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) psz_display = config_GetPsz( p_vout, "ggi_display" ); p_vout->p_sys->p_display = ggiOpen( psz_display, NULL ); - if( psz_display ) free( psz_display ); + free( psz_display ); if( p_vout->p_sys->p_display == NULL ) {