mirror of https://github.com/PCSX2/pcsx2.git
wxgui: Enumerate all the plugins on the Linux side. (And expose a nasty segfault problem.)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1712 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
635596c412
commit
ea1b204bde
|
@ -269,11 +269,13 @@
|
||||||
<Unit filename="../gui/AdvancedDialog.cpp" />
|
<Unit filename="../gui/AdvancedDialog.cpp" />
|
||||||
<Unit filename="../gui/AdvancedDialog.h" />
|
<Unit filename="../gui/AdvancedDialog.h" />
|
||||||
<Unit filename="../gui/App.h" />
|
<Unit filename="../gui/App.h" />
|
||||||
|
<Unit filename="../gui/AppAssert.cpp" />
|
||||||
<Unit filename="../gui/AppConfig.cpp" />
|
<Unit filename="../gui/AppConfig.cpp" />
|
||||||
<Unit filename="../gui/AppConfig.h" />
|
<Unit filename="../gui/AppConfig.h" />
|
||||||
<Unit filename="../gui/CheckedStaticBox.cpp" />
|
<Unit filename="../gui/CheckedStaticBox.cpp" />
|
||||||
<Unit filename="../gui/CheckedStaticBox.h" />
|
<Unit filename="../gui/CheckedStaticBox.h" />
|
||||||
<Unit filename="../gui/ConsoleLogger.cpp" />
|
<Unit filename="../gui/ConsoleLogger.cpp" />
|
||||||
|
<Unit filename="../gui/ConsoleLogger.h" />
|
||||||
<Unit filename="../gui/Dialogs/AboutBoxDialog.cpp" />
|
<Unit filename="../gui/Dialogs/AboutBoxDialog.cpp" />
|
||||||
<Unit filename="../gui/Dialogs/ConfigurationDialog.cpp" />
|
<Unit filename="../gui/Dialogs/ConfigurationDialog.cpp" />
|
||||||
<Unit filename="../gui/Dialogs/ConfigurationDialog.h" />
|
<Unit filename="../gui/Dialogs/ConfigurationDialog.h" />
|
||||||
|
|
|
@ -56,8 +56,14 @@ int EnumeratePluginsInFolder( const wxDirName& searchpath, wxArrayString* dest )
|
||||||
if( realdest == NULL )
|
if( realdest == NULL )
|
||||||
placebo.reset( realdest = new wxArrayString() );
|
placebo.reset( realdest = new wxArrayString() );
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
return searchpath.Exists() ?
|
return searchpath.Exists() ?
|
||||||
wxDir::GetAllFiles( searchpath.ToString(), realdest, wxsFormat( L"*%s", wxDynamicLibrary::GetDllExt()), wxDIR_FILES ) : 0;
|
wxDir::GetAllFiles( searchpath.ToString(), realdest, wxsFormat( L"*%s", wxDynamicLibrary::GetDllExt()), wxDIR_FILES ) : 0;
|
||||||
|
#else
|
||||||
|
return searchpath.Exists() ?
|
||||||
|
wxDir::GetAllFiles( searchpath.ToString(), realdest, wxsFormat( L"*%s*", wxDynamicLibrary::GetDllExt()), wxDIR_FILES ) : 0;
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -593,7 +599,7 @@ PluginManager::PluginManager( const wxString (&folders)[PluginId_Count] )
|
||||||
// Bind Optional Functions
|
// Bind Optional Functions
|
||||||
// (leave pointer null and do not generate error)
|
// (leave pointer null and do not generate error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hack for PAD's stupid parameter passed on Init
|
// Hack for PAD's stupid parameter passed on Init
|
||||||
PADinit = (_PADinit)m_info[PluginId_PAD].CommonBindings.Init;
|
PADinit = (_PADinit)m_info[PluginId_PAD].CommonBindings.Init;
|
||||||
m_info[PluginId_PAD].CommonBindings.Init = _hack_PADinit;
|
m_info[PluginId_PAD].CommonBindings.Init = _hack_PADinit;
|
||||||
|
@ -603,7 +609,7 @@ PluginManager::~PluginManager()
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
Shutdown();
|
Shutdown();
|
||||||
|
|
||||||
// All library unloading done automatically.
|
// All library unloading done automatically.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,13 +623,13 @@ void PluginManager::BindCommon( PluginsEnum_t pid )
|
||||||
while( current->MethodName != NULL )
|
while( current->MethodName != NULL )
|
||||||
{
|
{
|
||||||
*target = (VoidMethod*)m_info[pid].Lib.GetSymbol( current->GetMethodName( pid ) );
|
*target = (VoidMethod*)m_info[pid].Lib.GetSymbol( current->GetMethodName( pid ) );
|
||||||
|
|
||||||
if( *target == NULL )
|
if( *target == NULL )
|
||||||
*target = current->Fallback;
|
*target = current->Fallback;
|
||||||
|
|
||||||
if( *target == NULL )
|
if( *target == NULL )
|
||||||
throw Exception::NotPcsxPlugin( pid );
|
throw Exception::NotPcsxPlugin( pid );
|
||||||
|
|
||||||
target++;
|
target++;
|
||||||
current++;
|
current++;
|
||||||
}
|
}
|
||||||
|
@ -733,7 +739,7 @@ static bool OpenPlugin_FW()
|
||||||
void PluginManager::Open( PluginsEnum_t pid )
|
void PluginManager::Open( PluginsEnum_t pid )
|
||||||
{
|
{
|
||||||
if( m_info[pid].IsOpened ) return;
|
if( m_info[pid].IsOpened ) return;
|
||||||
|
|
||||||
// Each Open needs to be called explicitly. >_<
|
// Each Open needs to be called explicitly. >_<
|
||||||
|
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
@ -863,7 +869,7 @@ PluginManager* PluginManager_Create( const wxString (&folders)[PluginId_Count] )
|
||||||
PluginManager* PluginManager_Create( const wxChar* (&folders)[PluginId_Count] )
|
PluginManager* PluginManager_Create( const wxChar* (&folders)[PluginId_Count] )
|
||||||
{
|
{
|
||||||
wxString passins[PluginId_Count];
|
wxString passins[PluginId_Count];
|
||||||
|
|
||||||
const PluginInfo* pi = tbl_PluginInfo-1;
|
const PluginInfo* pi = tbl_PluginInfo-1;
|
||||||
while( ++pi, pi->shortname != NULL )
|
while( ++pi, pi->shortname != NULL )
|
||||||
passins[pi->id] = folders[pi->id];
|
passins[pi->id] = folders[pi->id];
|
||||||
|
@ -964,7 +970,7 @@ bool OpenCDVD( const char* pTitleFilename )
|
||||||
// if this assertion fails it means you didn't call CDVDsys_ChangeSource. You should.
|
// if this assertion fails it means you didn't call CDVDsys_ChangeSource. You should.
|
||||||
// You really should. Really.
|
// You really should. Really.
|
||||||
jASSUME( CDVD != NULL );
|
jASSUME( CDVD != NULL );
|
||||||
|
|
||||||
// Don't repetitively open the CDVD plugin if directly loading an elf file and open failed once already.
|
// Don't repetitively open the CDVD plugin if directly loading an elf file and open failed once already.
|
||||||
if (!OpenStatus.CDVD)
|
if (!OpenStatus.CDVD)
|
||||||
{
|
{
|
||||||
|
@ -974,12 +980,12 @@ bool OpenCDVD( const char* pTitleFilename )
|
||||||
pTitleFilename = cdvd_FileNameParam.c_str();
|
pTitleFilename = cdvd_FileNameParam.c_str();
|
||||||
|
|
||||||
if (DoCDVDopen(pTitleFilename) != 0)
|
if (DoCDVDopen(pTitleFilename) != 0)
|
||||||
{
|
{
|
||||||
Msgbox::Alert("Error Opening CDVD Plugin");
|
Msgbox::Alert("Error Opening CDVD Plugin");
|
||||||
ClosePlugins(true);
|
ClosePlugins(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( cdvd_FileNameParam.IsEmpty() && (pTitleFilename != NULL) )
|
if( cdvd_FileNameParam.IsEmpty() && (pTitleFilename != NULL) )
|
||||||
cdvd_FileNameParam = pTitleFilename;
|
cdvd_FileNameParam = pTitleFilename;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue