mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 09:39:46 -06:00
trying to clean all plugins on shutdown
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2047 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -92,13 +92,13 @@ int DynamicLibrary::Load(const char* filename)
|
||||
return 2;
|
||||
}
|
||||
|
||||
Console::Print("LoadLibrary: %s", filename);
|
||||
#ifdef _WIN32
|
||||
Console::Print("LoadLibrary: %s\n", filename);
|
||||
library = LoadLibrary(filename);
|
||||
#else
|
||||
library = dlopen(filename, RTLD_NOW | RTLD_LOCAL);
|
||||
#endif
|
||||
|
||||
Console::Print(" %p\n", library);
|
||||
if (!library) {
|
||||
LOG(MASTER_LOG, "Error loading DLL %s: %s", filename, GetLastErrorAsString().c_str());
|
||||
PanicAlert("Error loading DLL %s: %s\n", filename, GetLastErrorAsString().c_str());
|
||||
@ -116,15 +116,15 @@ int DynamicLibrary::Unload()
|
||||
PanicAlert("Error unloading DLL %s: not loaded", library_file.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Console::Print("FreeLibrary: %s %p\n", library_file.c_str(), library);
|
||||
#ifdef _WIN32
|
||||
Console::Print("FreeLibrary: %i\n", library_file.c_str());
|
||||
retval = FreeLibrary(library);
|
||||
retval = FreeLibrary(library);
|
||||
#else
|
||||
Console::Print("FreeLibrary: %i\n", library_file.c_str());
|
||||
retval = dlclose(library)?0:1;
|
||||
retval = dlclose(library)?0:1;
|
||||
#endif
|
||||
if (!retval) {
|
||||
|
||||
if (! retval) {
|
||||
PanicAlert("Error unloading DLL %s: %s", library_file.c_str(),
|
||||
GetLastErrorAsString().c_str());
|
||||
}
|
||||
|
@ -17,14 +17,9 @@
|
||||
|
||||
|
||||
|
||||
// =======================================================
|
||||
// File description
|
||||
// -------------
|
||||
/* This file is a simpler version of Plugin_...cpp found in Core. This file only loads
|
||||
the config and debugging windows and works with all plugins. */
|
||||
// =============
|
||||
/* This file is a simpler version of Plugin_...cpp found in Core. This file
|
||||
only loads the config and debugging windows and works with all plugins. */
|
||||
|
||||
|
||||
#include "Plugin.h"
|
||||
|
||||
namespace Common
|
||||
@ -35,7 +30,7 @@ CPlugin::~CPlugin()
|
||||
m_hInstLib.Unload();
|
||||
}
|
||||
|
||||
CPlugin::CPlugin(const char* _szName) : valid(false)
|
||||
CPlugin::CPlugin(const char* _szName) : valid(false)
|
||||
{
|
||||
|
||||
m_GetDllInfo = NULL;
|
||||
@ -82,7 +77,7 @@ void *CPlugin::LoadSymbol(const char *sym) {
|
||||
}
|
||||
|
||||
|
||||
// ______________________________________________________________________________________
|
||||
|
||||
// GetInfo: Get DLL info
|
||||
bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo) {
|
||||
if (m_GetDllInfo != NULL) {
|
||||
@ -93,7 +88,7 @@ bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
// ______________________________________________________________________________________
|
||||
|
||||
// Config: Open the Config window
|
||||
void CPlugin::Config(HWND _hwnd)
|
||||
{
|
||||
@ -102,7 +97,7 @@ void CPlugin::Config(HWND _hwnd)
|
||||
}
|
||||
|
||||
|
||||
// ______________________________________________________________________________________
|
||||
|
||||
// Debug: Open the Debugging window
|
||||
void CPlugin::Debug(HWND _hwnd, bool Show)
|
||||
{
|
||||
|
@ -3,6 +3,14 @@
|
||||
namespace Common {
|
||||
PluginVideo::PluginVideo(const char *_Filename) : CPlugin(_Filename), validVideo(false) {
|
||||
|
||||
Video_Prepare = 0;
|
||||
Video_SendFifoData = 0;
|
||||
Video_UpdateXFB = 0;
|
||||
Video_EnterLoop = 0;
|
||||
Video_Screenshot = 0;
|
||||
Video_AddMessage = 0;
|
||||
Video_Stop = 0;
|
||||
|
||||
Video_Prepare = reinterpret_cast<TVideo_Prepare>
|
||||
(LoadSymbol("Video_Prepare"));
|
||||
Video_SendFifoData = reinterpret_cast<TVideo_SendFifoData>
|
||||
@ -28,6 +36,5 @@ namespace Common {
|
||||
validVideo = true;
|
||||
}
|
||||
|
||||
PluginVideo::~PluginVideo() {
|
||||
}
|
||||
PluginVideo::~PluginVideo() {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user