From 5728087dbb345f4cadebdffccc0bd2f90db8c11e Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sat, 5 Sep 2009 01:53:12 +0000 Subject: [PATCH] wxgui: Test revision for Arcum -- with the plugin enumerator running in a single threaded model. git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1741 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/Panels/ConfigurationPanels.h | 2 -- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pcsx2/gui/Panels/ConfigurationPanels.h b/pcsx2/gui/Panels/ConfigurationPanels.h index 6ca9d12038..bafea89e23 100644 --- a/pcsx2/gui/Panels/ConfigurationPanels.h +++ b/pcsx2/gui/Panels/ConfigurationPanels.h @@ -406,8 +406,6 @@ namespace Panels virtual ~EnumThread(); EnumThread( PluginSelectorPanel& master ); void Cancel(); - - protected: sptr ExecuteTask(); }; diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index ec8434ab1d..de44a42f93 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -25,6 +25,9 @@ #include #include +// Allows us to force-disable threading for debugging/troubleshooting +static const bool DisableThreading = true; + using namespace wxHelpers; using namespace Threading; @@ -306,9 +309,17 @@ void Panels::PluginSelectorPanel::DoRefresh() // Use a thread to load plugins. safe_delete( m_EnumeratorThread ); m_EnumeratorThread = new EnumThread( *this ); - m_EnumeratorThread->Start(); - m_ComponentBoxes.Reset(); + if( DisableThreading ) + { + m_ComponentBoxes.Reset(); + m_EnumeratorThread->ExecuteTask(); + } + else + { + m_EnumeratorThread->Start(); + m_ComponentBoxes.Reset(); + } } bool Panels::PluginSelectorPanel::ValidateEnumerationStatus()