Пример #1
0
bool CGUIWindowManager::IsColorBufferActive()
{
  CGUIWindow* pWindow = GetWindow(GetActiveWindow());

  if(!pWindow)
    return false;

  if(pWindow->HasDynamicContents())
    return false;

  if(pWindow->IsAnimating())
    return false;

  int mode3d = MODE_3D_NONE;
#ifdef HAS_EMBEDDED
  mode3d = g_guiSettings.GetInt("videoscreen.mode3d");
#endif

  if(mode3d != MODE_3D_NONE)
    return false;

  // find the window with the lowest render order
  vector<CGUIWindow *> renderList = m_activeDialogs;
  stable_sort(renderList.begin(), renderList.end(), RenderOrderSortFunction);

  // iterate through all dialogs. If the dialog enable color buffer return true;
  for (iDialog it = renderList.begin(); it != renderList.end(); ++it)
  {
    if ((*it)->IsDialogRunning()) 
    {
      if ((*it)->IsAnimating())
      {
        return false;
      }
      else if((*it)->HasColorBufferActive())
          return true;
    }
  }

  return false;
}