[GraphicContext] Use stereo strength setting instead of fixed value.
authorAnton Fedchin <afedchin@ruswizards.com>
Wed, 19 Aug 2015 12:09:13 +0000 (15:09 +0300)
committerAnton Fedchin <afedchin@ruswizards.com>
Fri, 28 Aug 2015 11:40:52 +0000 (14:40 +0300)
xbmc/guilib/GraphicContext.cpp

index 59eca53..23938c5 100644 (file)
@@ -963,8 +963,8 @@ void CGraphicContext::UpdateCameraPosition(const CPoint &camera, const float &fa
   {
     RESOLUTION_INFO res = GetResInfo();
     RESOLUTION_INFO desktop = GetResInfo(RES_DESKTOP);
-    // currently use 5 as max. 
-    float scaleX = 5.f * (static_cast<float>(res.iWidth) / static_cast<float>(desktop.iWidth));
+    float scaleRes = (static_cast<float>(res.iWidth) / static_cast<float>(desktop.iWidth));
+    float scaleX = static_cast<float>(CSettings::GetInstance().GetInt(CSettings::SETTING_LOOKANDFEEL_STEREOSTRENGTH)) * scaleRes;
     stereoFactor = factor * (m_stereoView == RENDER_STEREO_VIEW_LEFT ? scaleX : -scaleX);
   }
   g_Windowing.SetCameraPosition(camera, m_iScreenWidth, m_iScreenHeight, stereoFactor);