wxGui: Lets not delete the Enumerator thread if we aren't threading it.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1742 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-09-05 03:37:02 +00:00
parent 5728087dbb
commit 0fa673fdd2
3 changed files with 12 additions and 8 deletions

View File

@ -106,9 +106,13 @@
<Linker> <Linker>
<Add option="-Xlinker -zmuldefs" /> <Add option="-Xlinker -zmuldefs" />
</Linker> </Linker>
<Unit filename="../../common/include/PS2Edefs.h" />
<Unit filename="../../common/include/PS2Etypes.h" />
<Unit filename="../../common/include/Pcsx2Api.h" />
<Unit filename="../../common/include/Pcsx2Config.h" /> <Unit filename="../../common/include/Pcsx2Config.h" />
<Unit filename="../../common/include/Pcsx2Defs.h" /> <Unit filename="../../common/include/Pcsx2Defs.h" />
<Unit filename="../../common/include/Pcsx2Types.h" /> <Unit filename="../../common/include/Pcsx2Types.h" />
<Unit filename="../../common/include/PluginCallbacks.h" />
<Unit filename="../../common/include/wx/folderdesc.txt" /> <Unit filename="../../common/include/wx/folderdesc.txt" />
<Unit filename="../../common/include/wx/scopedarray.h" /> <Unit filename="../../common/include/wx/scopedarray.h" />
<Unit filename="../../common/include/wx/scopedptr.h" /> <Unit filename="../../common/include/wx/scopedptr.h" />

View File

@ -46,7 +46,7 @@ Dialogs::PickUserModeDialog::PickUserModeDialog( wxWindow* parent, int id ) :
void Dialogs::PickUserModeDialog::OnOk_Click( wxCommandEvent& evt ) void Dialogs::PickUserModeDialog::OnOk_Click( wxCommandEvent& evt )
{ {
if( Panels::g_ApplyState.ApplyAll() ) if( Panels::g_ApplyState.ApplyAll(true) )
{ {
Close(); Close();
evt.Skip(); evt.Skip();

View File

@ -287,7 +287,7 @@ void Panels::PluginSelectorPanel::Apply( AppConfig& conf )
void Panels::PluginSelectorPanel::CancelRefresh() void Panels::PluginSelectorPanel::CancelRefresh()
{ {
safe_delete( m_EnumeratorThread ); if (!DisableThreading) safe_delete( m_EnumeratorThread );
safe_delete( m_FileList ); safe_delete( m_FileList );
} }
@ -307,7 +307,7 @@ void Panels::PluginSelectorPanel::DoRefresh()
m_StatusPanel.Show(); m_StatusPanel.Show();
// Use a thread to load plugins. // Use a thread to load plugins.
safe_delete( m_EnumeratorThread ); if (!DisableThreading) safe_delete( m_EnumeratorThread );
m_EnumeratorThread = new EnumThread( *this ); m_EnumeratorThread = new EnumThread( *this );
if( DisableThreading ) if( DisableThreading )
@ -363,7 +363,7 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( wxCommandEvent& evt )
void Panels::PluginSelectorPanel::OnEnumComplete( wxCommandEvent& evt ) void Panels::PluginSelectorPanel::OnEnumComplete( wxCommandEvent& evt )
{ {
safe_delete( m_EnumeratorThread ); if (!DisableThreading) safe_delete( m_EnumeratorThread );
// fixme: Default plugins should be picked based on the timestamp of the DLL or something? // fixme: Default plugins should be picked based on the timestamp of the DLL or something?
// (for now we just force it to selection zero if nothing's selected) // (for now we just force it to selection zero if nothing's selected)