Skip to content

Commit

Permalink
[fix] closes 13325. Make sure the main app loop keeps running.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Carroll committed Oct 31, 2012
1 parent 28ca9a4 commit fcc1090
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xbmc/filesystem/PluginDirectory.cpp
Expand Up @@ -39,6 +39,7 @@
#include "utils/log.h"
#include "utils/TimeUtils.h"
#include "ApplicationMessenger.h"
#include "Application.h"
#include "URL.h"

using namespace XFILE;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fcc1090

Please sign in to comment.