Core and PluginManager: Fixed Stop and Start again, the video plugin needed to be completely reset
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2012 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8eeb1d0202
commit
3c4a73d5a6
|
@ -130,7 +130,7 @@ int DynamicLibrary::Unload()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
Console::Print("FreeLibrary: %i\n", library);
|
Console::Print("FreeLibrary: %i\n", library_file.c_str());
|
||||||
retval = FreeLibrary(library);
|
retval = FreeLibrary(library);
|
||||||
#else
|
#else
|
||||||
retval = dlclose(library)?0:1;
|
retval = dlclose(library)?0:1;
|
||||||
|
|
|
@ -318,6 +318,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
||||||
VideoInitialize.pMemoryBase = Memory::base;
|
VideoInitialize.pMemoryBase = Memory::base;
|
||||||
VideoInitialize.pKeyPress = Callback_KeyPress;
|
VideoInitialize.pKeyPress = Callback_KeyPress;
|
||||||
VideoInitialize.bWii = _CoreParameter.bWii;
|
VideoInitialize.bWii = _CoreParameter.bWii;
|
||||||
|
Plugins.FreeVideo(); // This is needed for Stop and Start
|
||||||
Plugins.GetVideo()->Initialize(&VideoInitialize); // Call the dll
|
Plugins.GetVideo()->Initialize(&VideoInitialize); // Call the dll
|
||||||
|
|
||||||
// Under linux, this is an X11 Display, not an HWND!
|
// Under linux, this is an X11 Display, not an HWND!
|
||||||
|
|
|
@ -342,12 +342,23 @@ Common::PluginVideo *CPluginManager::GetVideo()
|
||||||
return m_video;
|
return m_video;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------
|
||||||
|
// Free plugins to completely reset all variables and potential DLLs loaded by the plugins in turn
|
||||||
|
// -------------
|
||||||
|
Common::PluginVideo *CPluginManager::FreeVideo()
|
||||||
|
{
|
||||||
|
delete m_video;
|
||||||
|
m_video = NULL;
|
||||||
|
m_video = (Common::PluginVideo*)LoadPlugin(m_params.m_strVideoPlugin.c_str(), 0);
|
||||||
|
return m_video;
|
||||||
|
}
|
||||||
Common::PluginPAD *CPluginManager::FreePad()
|
Common::PluginPAD *CPluginManager::FreePad()
|
||||||
{
|
{
|
||||||
delete m_pad[0];
|
delete m_pad[0];
|
||||||
m_pad[0] = NULL; m_pad[1] = NULL; m_pad[2] = NULL; m_pad[3] = NULL;
|
m_pad[0] = NULL; m_pad[1] = NULL; m_pad[2] = NULL; m_pad[3] = NULL;
|
||||||
m_pad[0] = (Common::PluginPAD*)LoadPlugin(m_params.m_strPadPlugin[0].c_str(), 0);
|
m_pad[0] = (Common::PluginPAD*)LoadPlugin(m_params.m_strPadPlugin[0].c_str(), 0);
|
||||||
return m_pad[0];
|
return m_pad[0];
|
||||||
|
|
||||||
}
|
}
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ public:
|
||||||
Common::PluginDSP *GetDSP();
|
Common::PluginDSP *GetDSP();
|
||||||
Common::PluginVideo *GetVideo();
|
Common::PluginVideo *GetVideo();
|
||||||
Common::PluginPAD *FreePad();
|
Common::PluginPAD *FreePad();
|
||||||
|
Common::PluginVideo *FreeVideo();
|
||||||
|
|
||||||
bool InitPlugins();
|
bool InitPlugins();
|
||||||
void ShutdownPlugins();
|
void ShutdownPlugins();
|
||||||
|
|
|
@ -623,6 +623,10 @@
|
||||||
RelativePath="..\..\PluginSpecs\pluginspecs_wiimote.h"
|
RelativePath="..\..\PluginSpecs\pluginspecs_wiimote.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Src\SConscript"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
|
|
Loading…
Reference in New Issue