Skip to content

Commit

Permalink
[GraphicContext] Use stereo strength setting instead of fixed value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Fedchin committed Aug 28, 2015
1 parent c3d31cf commit e000343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/guilib/GraphicContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e000343

Please sign in to comment.