Skip to content
Browse files

fixed: avoid black screen on transition when choosing new images over…

… upnp
  • Loading branch information...
1 parent 34de506 commit 8c7bdfa10d53de1b19e1c8fa6a6378eae3e6b038 @elupus elupus committed Jun 28, 2011
Showing with 28 additions and 9 deletions.
  1. +2 −1 xbmc/ApplicationMessenger.cpp
  2. +23 −3 xbmc/network/UPnP.cpp
  3. +3 −5 xbmc/pictures/GUIWindowSlideShow.cpp
View
3 xbmc/ApplicationMessenger.cpp
@@ -337,7 +337,7 @@ case TMSG_POWERDOWN:
g_application.WakeUpScreenSaverAndDPMS();
g_graphicsContext.Lock();
- pSlideShow->Reset();
+
if (g_windowManager.GetActiveWindow() != WINDOW_SLIDESHOW)
g_windowManager.ActivateWindow(WINDOW_SLIDESHOW);
if (URIUtils::IsZIP(pMsg->strParam) || URIUtils::IsRAR(pMsg->strParam)) // actually a cbz/cbr
@@ -352,6 +352,7 @@ case TMSG_POWERDOWN:
CUtil::GetRecursiveListing(strPath, items, g_settings.m_pictureExtensions);
if (items.Size() > 0)
{
+ pSlideShow->Reset();
for (int i=0;i<items.Size();++i)
{
pSlideShow->Add(items[i].get());
View
26 xbmc/network/UPnP.cpp
@@ -1778,7 +1778,15 @@ CUPnPRenderer::GetMetadata(NPT_String& meta)
NPT_Result
CUPnPRenderer::OnNext(PLT_ActionReference& action)
{
- g_application.getApplicationMessenger().PlayListPlayerNext();
+ if (g_windowManager.GetActiveWindow() == WINDOW_SLIDESHOW) {
+ CGUIWindowSlideShow *slideshow = (CGUIWindowSlideShow *)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
+ if (slideshow == NULL) {
+ return NPT_FAILURE;
+ }
+ slideshow->ShowNext();
+ } else {
+ g_application.getApplicationMessenger().PlayListPlayerNext();
+ }
return NPT_SUCCESS;
}
@@ -1823,7 +1831,15 @@ CUPnPRenderer::OnPlay(PLT_ActionReference& action)
NPT_Result
CUPnPRenderer::OnPrevious(PLT_ActionReference& action)
{
- g_application.getApplicationMessenger().PlayListPlayerPrevious();
+ if (g_windowManager.GetActiveWindow() == WINDOW_SLIDESHOW) {
+ CGUIWindowSlideShow *slideshow = (CGUIWindowSlideShow *)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
+ if (slideshow == NULL) {
+ return NPT_FAILURE;
+ }
+ slideshow->ShowPrevious();
+ } else {
+ g_application.getApplicationMessenger().PlayListPlayerPrevious();
+ }
return NPT_SUCCESS;
}
@@ -1833,7 +1849,11 @@ CUPnPRenderer::OnPrevious(PLT_ActionReference& action)
NPT_Result
CUPnPRenderer::OnStop(PLT_ActionReference& action)
{
- g_application.getApplicationMessenger().MediaStop();
+ if (g_windowManager.GetActiveWindow() == WINDOW_SLIDESHOW) {
+ g_windowManager.PreviousWindow();
+ } else {
+ g_application.getApplicationMessenger().MediaStop();
+ }
return NPT_SUCCESS;
}
View
8 xbmc/pictures/GUIWindowSlideShow.cpp
@@ -238,11 +238,9 @@ void CGUIWindowSlideShow::Select(const CStdString& strPicture)
const CFileItemPtr item = m_slides->Get(i);
if (item->m_strPath == strPicture)
{
- m_iCurrentSlide = i;
- m_iNextSlide = m_iCurrentSlide + 1;
- if (m_iNextSlide >= m_slides->Size())
- m_iNextSlide = 0;
- m_iDirection = 1;
+ m_iNextSlide = i;
+ m_iDirection = 1;
+ m_bLoadNextPic = true;
return ;
}
}

0 comments on commit 8c7bdfa

Please sign in to comment.
Something went wrong with that request. Please try again.