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>
<Add option="-Xlinker -zmuldefs" />
</Linker>
<Unit filename="../../common/include/Pcsx2Config.h" />
<Unit filename="../../common/include/Pcsx2Defs.h" />
<Unit filename="../../common/include/Pcsx2Types.h" />
<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/Pcsx2Defs.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/scopedarray.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 )
{
if( Panels::g_ApplyState.ApplyAll() )
if( Panels::g_ApplyState.ApplyAll(true) )
{
Close();
evt.Skip();

View File

@ -287,7 +287,7 @@ void Panels::PluginSelectorPanel::Apply( AppConfig& conf )
void Panels::PluginSelectorPanel::CancelRefresh()
{
safe_delete( m_EnumeratorThread );
if (!DisableThreading) safe_delete( m_EnumeratorThread );
safe_delete( m_FileList );
}
@ -295,7 +295,7 @@ void Panels::PluginSelectorPanel::DoRefresh()
{
// Disable all controls until enumeration is complete.
// Show status bar for plugin enumeration.
// fixme: the status bar doesn't always fit itself to the window correctly because
// sometimes this gets called before the parent window has been fully created. I'm
// not quite sure how to fix (a delayed event/message might work tho implementing it
@ -307,7 +307,7 @@ void Panels::PluginSelectorPanel::DoRefresh()
m_StatusPanel.Show();
// Use a thread to load plugins.
safe_delete( m_EnumeratorThread );
if (!DisableThreading) safe_delete( m_EnumeratorThread );
m_EnumeratorThread = new EnumThread( *this );
if( DisableThreading )
@ -363,7 +363,7 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( 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?
// (for now we just force it to selection zero if nothing's selected)