nJoy and PluginManager:

1. Avoided LoadLibrary() and FreeLibrary() in favor of using an existing LoadLibrary() because of an unresolved crash related to LoadLibrary() and nJoy. After several times of LoadLibrary() and FreeLibrary() of nJoy these seems to be some kind of memory corruption that brings up several error boxes from different places (not just nJoy) and then cause a crash.

2. Slowed down the moving of the pad initialization to InputCommon. I'm not against InputCommon at all, but I have to spend some more time with it before it works on Windows

3. Partly fixed a somewhat frequent failure of nJoy with SDL 1.3 that would give a strange DirectInput error message and cause the pads to not function. It's still present before the nJoy config windows is opened. It's only fixed on booting a game.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1991 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-01-23 10:00:59 +00:00
parent d450e054a4
commit 63ad74f9e8
19 changed files with 485 additions and 290 deletions

View File

@ -37,8 +37,10 @@ CPlugin::~CPlugin()
CPlugin::CPlugin(const char* _szName) : valid(false)
{
if (m_hInstLib.Load(_szName)) {
if (m_hInstLib.Load(_szName))
{
// Create pointers to the DLL functions
m_GetDllInfo = reinterpret_cast<TGetDllInfo>
(m_hInstLib.Get("GetDllInfo"));
m_DllConfig = reinterpret_cast<TDllConfig>
@ -56,24 +58,28 @@ CPlugin::CPlugin(const char* _szName) : valid(false)
}
if (m_GetDllInfo != 0 &&
m_DllConfig != 0 &&
m_DllDebugger != 0 &&
m_SetDllGlobals != 0 &&
m_Initialize != 0 &&
m_Shutdown != 0 &&
m_DoState != 0)
m_DllConfig != 0 &&
m_DllDebugger != 0 &&
m_SetDllGlobals != 0 &&
m_Initialize != 0 &&
m_Shutdown != 0 &&
m_DoState != 0)
valid = true;
// Save the filename for this plugin
Filename = _szName;
}
void *CPlugin::LoadSymbol(const char *sym) {
void *CPlugin::LoadSymbol(const char *sym)
{
return m_hInstLib.Get(sym);
}
// ______________________________________________________________________________________
// GetInfo: Get DLL info
bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo) {
bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo)
{
if (m_GetDllInfo != 0)
{
m_GetDllInfo(&_pluginInfo);