Skip to content

Commit

Permalink
Don't adjust 3d rectangles in bypass mode
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Dec 31, 2015
1 parent 55059b6 commit 1e77ac4
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions xbmc/cores/VideoPlayer/VideoRenderers/BaseRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,35 +345,38 @@ void CBaseRenderer::ManageDisplay()
else if(stereo_view == RENDER_STEREO_VIEW_RIGHT) stereo_view = RENDER_STEREO_VIEW_LEFT;
}

switch(stereo_mode)
if (m_format != RENDER_FMT_BYPASS)
{
case CONF_FLAGS_STEREO_MODE_TAB:
// Those are flipped in y
if (m_format == RENDER_FMT_CVBREF || m_format == RENDER_FMT_MEDIACODEC)
{
if (stereo_view == RENDER_STEREO_VIEW_LEFT)
m_sourceRect.y1 += m_sourceRect.y2*0.5f;
else if(stereo_view == RENDER_STEREO_VIEW_RIGHT)
m_sourceRect.y2 *= 0.5f;
}
else
{
if (stereo_view == RENDER_STEREO_VIEW_LEFT)
m_sourceRect.y2 *= 0.5f;
switch(stereo_mode)
{
case CONF_FLAGS_STEREO_MODE_TAB:
// Those are flipped in y
if (m_format == RENDER_FMT_CVBREF || m_format == RENDER_FMT_MEDIACODEC)
{
if (stereo_view == RENDER_STEREO_VIEW_LEFT)
m_sourceRect.y1 += m_sourceRect.y2*0.5f;
else if(stereo_view == RENDER_STEREO_VIEW_RIGHT)
m_sourceRect.y2 *= 0.5f;
}
else
{
if (stereo_view == RENDER_STEREO_VIEW_LEFT)
m_sourceRect.y2 *= 0.5f;
else if(stereo_view == RENDER_STEREO_VIEW_RIGHT)
m_sourceRect.y1 += m_sourceRect.y2*0.5f;
}
break;

case CONF_FLAGS_STEREO_MODE_SBS:
if (stereo_view == RENDER_STEREO_VIEW_LEFT)
m_sourceRect.x2 *= 0.5f;
else if(stereo_view == RENDER_STEREO_VIEW_RIGHT)
m_sourceRect.y1 += m_sourceRect.y2*0.5f;
}
break;

case CONF_FLAGS_STEREO_MODE_SBS:
if (stereo_view == RENDER_STEREO_VIEW_LEFT)
m_sourceRect.x2 *= 0.5f;
else if(stereo_view == RENDER_STEREO_VIEW_RIGHT)
m_sourceRect.x1 += m_sourceRect.x2*0.5f;
break;
m_sourceRect.x1 += m_sourceRect.x2*0.5f;
break;

default:
break;
default:
break;
}
}

CalcNormalDisplayRect(m_viewRect.x1, m_viewRect.y1, m_viewRect.Width(), m_viewRect.Height(), GetAspectRatio() * CDisplaySettings::GetInstance().GetPixelRatio(), CDisplaySettings::GetInstance().GetZoomAmount(), CDisplaySettings::GetInstance().GetVerticalShift());
Expand Down

0 comments on commit 1e77ac4

Please sign in to comment.