Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move display effect code into standalone method GetDisplayEffect.

  • Loading branch information...
commit 477ad58fde5ddac6aeb8fa6e7e1c4903c7e0885c 1 parent 6eb4757
@ulion authored
View
13 xbmc/pictures/GUIWindowSlideShow.cpp
@@ -1069,6 +1069,14 @@ bool CGUIWindowSlideShow::PlayVideo()
return false;
}
+CSlideShowPic::DISPLAY_EFFECT CGUIWindowSlideShow::GetDisplayEffect(int iSlideNumber) const
+{
+ if (m_bSlideShow && !m_bPause && !m_slides->Get(iSlideNumber)->IsVideo())
+ return CSettings::Get().GetBool("slideshow.displayeffects") ? CSlideShowPic::EFFECT_RANDOM : CSlideShowPic::EFFECT_NONE;
+ else
+ return CSlideShowPic::EFFECT_NO_TIMEOUT;
+}
+
void CGUIWindowSlideShow::OnLoadPic(int iPic, int iSlideNumber, const CStdString &strFileName, CBaseTexture* pTexture, bool bFullSize)
{
if (pTexture)
@@ -1094,10 +1102,7 @@ void CGUIWindowSlideShow::OnLoadPic(int iPic, int iSlideNumber, const CStdString
}
else
{
- if (m_bSlideShow)
- m_Image[iPic].SetTexture(iSlideNumber, pTexture, CSettings::Get().GetBool("slideshow.displayeffects") ? CSlideShowPic::EFFECT_RANDOM : CSlideShowPic::EFFECT_NONE);
- else
- m_Image[iPic].SetTexture(iSlideNumber, pTexture, CSlideShowPic::EFFECT_NO_TIMEOUT);
+ m_Image[iPic].SetTexture(iSlideNumber, pTexture, GetDisplayEffect(iSlideNumber));
m_Image[iPic].SetOriginalSize(pTexture->GetOriginalWidth(), pTexture->GetOriginalHeight(), bFullSize);
m_Image[iPic].m_bIsComic = false;
View
1  xbmc/pictures/GUIWindowSlideShow.h
@@ -104,6 +104,7 @@ class CGUIWindowSlideShow : public CGUIWindow
SORT_METHOD method = SORT_METHOD_LABEL,
SortOrder order = SortOrderAscending);
bool PlayVideo();
+ CSlideShowPic::DISPLAY_EFFECT GetDisplayEffect(int iSlideNumber) const;
void RenderPause();
void RenderErrorMessage();
void Rotate(float fAngle, bool immediate = false);
Please sign in to comment.
Something went wrong with that request. Please try again.