]> git.sesse.net Git - vlc/blobdiff - modules/video_output/x11/glx.c
Really fix all the set_name.
[vlc] / modules / video_output / x11 / glx.c
index 23f89f7b87dd67272cd3a1c639d810e9c59c367f..f4a84cec881afeabe2591e99dd092f1ada1bda10 100644 (file)
@@ -109,6 +109,9 @@ static void SwitchContext( vout_thread_t * );
     "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 );
@@ -176,16 +179,15 @@ static void DestroyOpenGL( vlc_object_t *p_this )
  *****************************************************************************/
 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;
     }
 
@@ -207,10 +209,7 @@ static int CheckGLX( vlc_object_t *p_this, vlc_bool_t *b_glx13 )
     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)) )