"set it to 0 for first screen, 1 for the second.")
vlc_module_begin();
+ set_shortname( N_("OpenGL") );
+ set_category( CAT_VIDEO );
+ set_subcategory( SUBCAT_VIDEO_VOUT );
set_description( _("X11 OpenGL provider") );
set_capability( "opengl provider", 50 );
set_callbacks( CreateOpenGL, DestroyOpenGL );
*****************************************************************************/
static int CheckGLX( vlc_object_t *p_this, vlc_bool_t *b_glx13 )
{
- Display *p_display;
- int i_opcode, i_evt, i_err;
- int i_maj, i_min;
+ Display *p_display = NULL;
+ int i_opcode, i_evt, i_err = 0;
+ int i_maj, i_min = 0;
/* Open the display */
p_display = XOpenDisplay( NULL );
- if( !p_display )
+ if( p_display == NULL )
{
msg_Err( p_this, "Cannot open display" );
- XCloseDisplay( p_display );
return VLC_EGENERIC;
}
if (!glXQueryVersion( p_display, &i_maj, &i_min ) )
{
msg_Err( p_this, "glXQueryVersion failed" );
- if( p_display != NULL )
- {
- XCloseDisplay( p_display );
- }
+ XCloseDisplay( p_display );
return VLC_EGENERIC;
}
if( i_maj <= 0 || ((i_maj == 1) && (i_min < 3)) )