From 0fa673fdd2cec65a8a4158d53207f4615ef8d7dd Mon Sep 17 00:00:00 2001 From: arcum42 Date: Sat, 5 Sep 2009 03:37:02 +0000 Subject: [PATCH] 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 --- pcsx2/Linux/pcsx2.cbp | 10 +++++++--- pcsx2/gui/Dialogs/PickUserModeDialog.cpp | 2 +- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp index 3b4ac386b6..5370d7f721 100644 --- a/pcsx2/Linux/pcsx2.cbp +++ b/pcsx2/Linux/pcsx2.cbp @@ -106,9 +106,13 @@ - - - + + + + + + + diff --git a/pcsx2/gui/Dialogs/PickUserModeDialog.cpp b/pcsx2/gui/Dialogs/PickUserModeDialog.cpp index c653652df3..99c3e39935 100644 --- a/pcsx2/gui/Dialogs/PickUserModeDialog.cpp +++ b/pcsx2/gui/Dialogs/PickUserModeDialog.cpp @@ -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(); diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index de44a42f93..36e0e923ea 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -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)