Skip to content

Commit

Permalink
renderer: fix subtitle (text) positions for alignment outside video, …
Browse files Browse the repository at this point in the history
…consider height of text
  • Loading branch information
FernetMenta committed Jun 14, 2015
1 parent 54137be commit 74ad4c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xbmc/cores/VideoRenderers/OverlayRendererGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,16 @@ void COverlayText::Render(OVERLAY::SRenderState &state)
mat.m[0][3] = rd.x1;
mat.m[1][3] = rd.y1;

float x = state.x, y = state.y;
float x = state.x;
float y = state.y;
mat.InverseTransformPosition(x, y);

g_graphicsContext.SetTransform(mat, 1.0f, 1.0f);

float width_max = (float) res.Overscan.right - res.Overscan.left;

if (m_subalign == SUBTITLE_ALIGN_MANUAL
|| m_subalign == SUBTITLE_ALIGN_TOP_OUTSIDE
|| m_subalign == SUBTITLE_ALIGN_BOTTOM_OUTSIDE
|| m_subalign == SUBTITLE_ALIGN_BOTTOM_INSIDE)
y -= m_height;

Expand Down

0 comments on commit 74ad4c1

Please sign in to comment.