fixed: restore ability to calibrate resolution pixel ratio
authorJoakim Plate <elupus@ecce.se>
Sun, 18 Aug 2013 15:58:35 +0000 (17:58 +0200)
committerJoakim Plate <elupus@ecce.se>
Sun, 18 Aug 2013 15:58:35 +0000 (17:58 +0200)
Was broken by 3d merge

xbmc/guilib/GraphicContext.cpp

index a2eb002..0c2ee8c 100644 (file)
@@ -720,14 +720,21 @@ void CGraphicContext::SetResInfo(RESOLUTION res, const RESOLUTION_INFO& info)
   RESOLUTION_INFO& curr = CDisplaySettings::Get().GetResolutionInfo(res);
   curr.Overscan   = info.Overscan;
   curr.iSubtitles = info.iSubtitles;
+  curr.fPixelRatio = info.fPixelRatio;
 
   if(info.dwFlags & D3DPRESENTFLAG_MODE3DSBS)
+  {
     curr.Overscan.right  = info.Overscan.right  * 2 + info.iBlanking;
+    if((curr.dwFlags & D3DPRESENTFLAG_MODE3DSBS) == 0)
+      curr.fPixelRatio  /= 2.0;
+  }
 
   if(info.dwFlags & D3DPRESENTFLAG_MODE3DTB)
   {
     curr.Overscan.bottom = info.Overscan.bottom * 2 + info.iBlanking;
     curr.iSubtitles      = info.iSubtitles      * 2 + info.iBlanking;
+    if((curr.dwFlags & D3DPRESENTFLAG_MODE3DTB) == 0)
+      curr.fPixelRatio  *= 2.0;
   }
 }