From fcc109044eef551aee72a50c5320fd8847e9455b Mon Sep 17 00:00:00 2001 From: Jim Carroll Date: Tue, 30 Oct 2012 21:25:24 -0400 Subject: [PATCH] [fix] closes 13325. Make sure the main app loop keeps running. --- xbmc/filesystem/PluginDirectory.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp index 6c084fd7c29e3..73f926b00a6a7 100644 --- a/xbmc/filesystem/PluginDirectory.cpp +++ b/xbmc/filesystem/PluginDirectory.cpp @@ -39,6 +39,7 @@ #include "utils/log.h" #include "utils/TimeUtils.h" #include "ApplicationMessenger.h" +#include "Application.h" #include "URL.h" using namespace XFILE; @@ -464,6 +465,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS unsigned int startTime = XbmcThreads::SystemClockMillis(); CGUIDialogProgress *progressBar = NULL; bool cancelled = false; + bool inMainAppThread = g_application.IsCurrentThread(); CLog::Log(LOGDEBUG, "%s - waiting on the %s plugin...", __FUNCTION__, scriptName.c_str()); while (true) @@ -521,6 +523,11 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS m_cancelled = true; } } + else // if the progressBar exists and we call StartModal or Progress we get the + // ProcessRenderLoop call anyway. + if (inMainAppThread) + g_windowManager.ProcessRenderLoop(); + if (!cancelled && m_cancelled) { cancelled = true;