aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorspiff_ <spiff_@svn>2010-06-22 21:02:38 +0000
committerspiff_ <spiff_@svn>2010-06-22 21:02:38 +0000
commit7b34cdc9264972ec5059c6af48a852816884bd44 (patch)
tree9d2a9832a6e1f3ff0fcb4790dd7c8eac2ab90acc /guilib
parent33f67737f43111b5614d095ff95827982646e2a1 (diff)
fixed: endless dialogs if a visualisation didn't work properly. thanks to clumsy
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31316 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/GUIVisualisationControl.cpp7
-rw-r--r--guilib/GUIVisualisationControl.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/guilib/GUIVisualisationControl.cpp b/guilib/GUIVisualisationControl.cpp
index 45a942fac5..bcbf83361c 100644
--- a/guilib/GUIVisualisationControl.cpp
+++ b/guilib/GUIVisualisationControl.cpp
@@ -34,7 +34,7 @@ using namespace ADDON;
#define LABEL_ROW3 12
CGUIVisualisationControl::CGUIVisualisationControl(int parentID, int controlID, float posX, float posY, float width, float height)
- : CGUIRenderingControl(parentID, controlID, posX, posY, width, height)
+ : CGUIRenderingControl(parentID, controlID, posX, posY, width, height), m_bAttemptedLoad(false)
{
ControlType = GUICONTROL_VISUALISATION;
}
@@ -47,11 +47,13 @@ CGUIVisualisationControl::CGUIVisualisationControl(const CGUIVisualisationContro
void CGUIVisualisationControl::Render()
{
- if (!m_addon && g_application.IsPlayingAudio())
+ if (!m_addon && g_application.IsPlayingAudio() && !m_bAttemptedLoad)
{
AddonPtr viz;
if (ADDON::CAddonMgr::Get().GetDefault(ADDON_VIZ, viz))
LoadAddon(viz);
+
+ m_bAttemptedLoad = true;
}
else
CGUIRenderingControl::Render();
@@ -59,6 +61,7 @@ void CGUIVisualisationControl::Render()
void CGUIVisualisationControl::FreeResources(bool immediately)
{
+ m_bAttemptedLoad = false;
// tell our app that we're going
if (!m_addon)
return;
diff --git a/guilib/GUIVisualisationControl.h b/guilib/GUIVisualisationControl.h
index 3d0a76163a..7b5fa931b4 100644
--- a/guilib/GUIVisualisationControl.h
+++ b/guilib/GUIVisualisationControl.h
@@ -30,4 +30,6 @@ public:
virtual CGUIVisualisationControl *Clone() const { return new CGUIVisualisationControl(*this); }; //TODO check for naughties
virtual void FreeResources(bool immediately = false);
virtual void Render();
+private:
+ bool m_bAttemptedLoad;
};