]> git.sesse.net Git - vlc/commitdiff
* ./src/misc/modules.c: restored plugins hiding as the problem is fixed.
authorGildas Bazin <gbazin@videolan.org>
Wed, 22 May 2002 19:31:33 +0000 (19:31 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 22 May 2002 19:31:33 +0000 (19:31 +0000)
* ./plugins/directx/directx.c: UnregisterClass() in MODULE_DEACTIVATE. If
   we don't do this, trying to use the class when the plugin is reloaded will
   cause a segfault.

PS: on Win32 the sdl plugin is still affected by this. It looks like SDL keeps
    an internal state which isn't updated when we reload the plugin.

plugins/directx/directx.c
src/misc/modules.c

index edfb61e0ed669c8adcc3e046cefca4d0f28fa501..42c8af5baa992947b29a299b9c65eb57a7e42042 100644 (file)
@@ -2,7 +2,7 @@
  * directx.c : Windows DirectX plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: directx.c,v 1.8 2002/05/18 13:30:28 gbazin Exp $
+ * $Id: directx.c,v 1.9 2002/05/22 19:31:33 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *      
@@ -74,4 +74,9 @@ MODULE_ACTIVATE_START
 MODULE_ACTIVATE_STOP
 
 MODULE_DEACTIVATE_START
+    /* check if we registered a window class because we need to
+     * unregister it */
+    WNDCLASS wndclass;
+    if( GetClassInfo( GetModuleHandle(NULL), "VLC DirectX", &wndclass ) )
+        UnregisterClass( "VLC DirectX", GetModuleHandle(NULL) );
 MODULE_DEACTIVATE_STOP
index eb2a426377ade2c79ea95a62146a6d836d040f86..8e5347486554f710b5b155efd12ab0f85b76db3b 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.61 2002/05/22 17:19:46 sam Exp $
+ * $Id: modules.c,v 1.62 2002/05/22 19:31:33 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -228,9 +228,7 @@ void module_ManageBank( void )
         {
             if( p_module->i_unused_delay < MODULE_HIDE_DELAY )
             {
-                /* FIXME: sometimes a module that has been unloaded does not
-                 * work properly when loaded again. Check what's wrong. */
-                //p_module->i_unused_delay++;
+                p_module->i_unused_delay++;
             }
             else
             {