Skip to content

Commit

Permalink
VideoPlayer: flush renderer when skin is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Sep 20, 2015
1 parent 6071f8e commit 7fdc80b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions xbmc/Application.cpp
Expand Up @@ -1657,18 +1657,17 @@ bool CApplication::LoadSkin(const SkinPtr& skin)

bool bPreviousPlayingState=false;
bool bPreviousRenderingState=false;
if (g_application.m_pPlayer->IsPlayingVideo())
if (m_pPlayer->IsPlayingVideo())
{
bPreviousPlayingState = !g_application.m_pPlayer->IsPausedPlayback();
bPreviousPlayingState = !m_pPlayer->IsPausedPlayback();
if (bPreviousPlayingState)
g_application.m_pPlayer->Pause();
#ifdef HAS_VIDEO_PLAYBACK
m_pPlayer->Pause();
m_pPlayer->FlushRenderer();
if (g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO)
{
g_windowManager.ActivateWindow(WINDOW_HOME);
bPreviousRenderingState = true;
}
#endif
}
// close the music and video overlays (they're re-opened automatically later)
CSingleLock lock(g_graphicsContext);
Expand Down Expand Up @@ -1758,10 +1757,10 @@ bool CApplication::LoadSkin(const SkinPtr& skin)
}
}

if (g_application.m_pPlayer->IsPlayingVideo())
if (m_pPlayer->IsPlayingVideo())
{
if (bPreviousPlayingState)
g_application.m_pPlayer->Pause();
m_pPlayer->Pause();
if (bPreviousRenderingState)
g_windowManager.ActivateWindow(WINDOW_FULLSCREEN_VIDEO);
}
Expand Down

0 comments on commit 7fdc80b

Please sign in to comment.