Skip to content

Commit

Permalink
CGUIInfoManager::GetInt flag Player.Progress (and similiar) as handle…
Browse files Browse the repository at this point in the history
…d if player isn't active

this fixes keeping stale Player.Progress value in progress control after stoping media
  • Loading branch information
pieh committed Sep 29, 2011
1 parent d71b465 commit 7a66387
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1673,29 +1673,29 @@ bool CGUIInfoManager::GetInt(int &value, int info, int contextWindow, const CGUI
{
case PLAYER_PROGRESS:
value = (int)(g_application.GetPercentage());
return true;
break;
case PLAYER_PROGRESS_CACHE:
value = (int)(g_application.GetCachePercentage());
return true;
break;
case PLAYER_SEEKBAR:
{
CGUIDialogSeekBar *seekBar = (CGUIDialogSeekBar*)g_windowManager.GetWindow(WINDOW_DIALOG_SEEK_BAR);
value = seekBar ? (int)seekBar->GetPercentage() : 0;
return true;
break;
}
case PLAYER_CACHELEVEL:
value = (int)(g_application.m_pPlayer->GetCacheLevel());
return true;
break;
case PLAYER_CHAPTER:
value = g_application.m_pPlayer->GetChapter();
return true;
break;
case PLAYER_CHAPTERCOUNT:
value = g_application.m_pPlayer->GetChapterCount();
return true;
break;
}
}
}
break;
return true;
case SYSTEM_FREE_MEMORY:
case SYSTEM_USED_MEMORY:
{
Expand All @@ -1712,10 +1712,8 @@ bool CGUIInfoManager::GetInt(int &value, int info, int contextWindow, const CGUI
{
CGUIDialogProgress *bar = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
if (bar && bar->IsDialogRunning())
{
value = bar->GetPercentage();
return true;
}
return true;
}
case SYSTEM_FREE_SPACE:
case SYSTEM_USED_SPACE:
Expand Down

0 comments on commit 7a66387

Please sign in to comment.