From 0cd5d9133656183f9d25ba3b1019a6272487fcd9 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Wed, 22 May 2002 19:31:33 +0000 Subject: [PATCH] * ./src/misc/modules.c: restored plugins hiding as the problem is fixed. * ./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 | 7 ++++++- src/misc/modules.c | 6 ++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/directx/directx.c b/plugins/directx/directx.c index edfb61e0ed..42c8af5baa 100644 --- a/plugins/directx/directx.c +++ b/plugins/directx/directx.c @@ -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 * @@ -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 diff --git a/src/misc/modules.c b/src/misc/modules.c index eb2a426377..8e53474865 100644 --- a/src/misc/modules.c +++ b/src/misc/modules.c @@ -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 * Ethan C. Baldridge @@ -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 { -- 2.39.2