fixed: disable non-linear stretch when a dvd menu is shown, parts of the menu are...
authorbobo1on1 <bobo1on1@svn>
Wed, 25 Aug 2010 15:37:36 +0000 (15:37 +0000)
committerbobo1on1 <bobo1on1@svn>
Wed, 25 Aug 2010 15:37:36 +0000 (15:37 +0000)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33135 568bbfeb-2a22-0410-94d2-cc84cf5bfa90

xbmc/cores/VideoRenderers/LinuxRendererGL.cpp

index c641ada..3d1d783 100644 (file)
@@ -1366,10 +1366,16 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field)
 
   m_pYUVShader->SetBlack(g_settings.m_currentVideoSettings.m_Brightness * 0.01f - 0.5f);
   m_pYUVShader->SetContrast(g_settings.m_currentVideoSettings.m_Contrast * 0.02f);
-  m_pYUVShader->SetNonLinStretch(pow(g_settings.m_fPixelRatio, g_advancedSettings.m_videoNonLinStretchRatio));
   m_pYUVShader->SetWidth(planes[0].texwidth);
   m_pYUVShader->SetHeight(planes[0].texheight);
 
+  //disable non-linear stretch when a dvd menu is shown, parts of the menu are rendered through the overlay renderer
+  //having non-linear stretch on breaks the alignment
+  if (g_application.m_pPlayer && g_application.m_pPlayer->IsInMenu())
+    m_pYUVShader->SetNonLinStretch(1.0);
+  else
+    m_pYUVShader->SetNonLinStretch(pow(g_settings.m_fPixelRatio, g_advancedSettings.m_videoNonLinStretchRatio));
+
   if     (field == FIELD_ODD)
     m_pYUVShader->SetField(1);
   else if(field == FIELD_EVEN)
@@ -1571,7 +1577,14 @@ void CLinuxRendererGL::RenderMultiPass(int index, int field)
     m_pVideoFilterShader->SetSourceTexture(0);
     m_pVideoFilterShader->SetWidth(m_sourceWidth);
     m_pVideoFilterShader->SetHeight(m_sourceHeight);
-    m_pVideoFilterShader->SetNonLinStretch(pow(g_settings.m_fPixelRatio, g_advancedSettings.m_videoNonLinStretchRatio));
+
+    //disable non-linear stretch when a dvd menu is shown, parts of the menu are rendered through the overlay renderer
+    //having non-linear stretch on breaks the alignment
+    if (g_application.m_pPlayer && g_application.m_pPlayer->IsInMenu())
+      m_pVideoFilterShader->SetNonLinStretch(1.0);
+    else
+      m_pVideoFilterShader->SetNonLinStretch(pow(g_settings.m_fPixelRatio, g_advancedSettings.m_videoNonLinStretchRatio));
+
     m_pVideoFilterShader->Enable();
   }
   else