diff options
author | v0lt <v0lt@users.sourceforge.net> | 2011-12-04 22:52:59 +0400 |
---|---|---|
committer | v0lt <v0lt@users.sourceforge.net> | 2011-12-04 22:52:59 +0400 |
commit | 11670855abb09983c73a2dfe3a42ac29cb3a1ddf (patch) | |
tree | 64f3cf261ddaad9af8eba75a69a9afbe8a433e8b /src/Subtitles | |
parent | b050be509dcdd61d9bd1fc1ec3b222b41c0403b9 (diff) |
fixed location of non-style subtitle, when the width to 2 times greater than the height (partial rollback r3808)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3884 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/Subtitles')
-rw-r--r-- | src/Subtitles/RTS.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/Subtitles/RTS.cpp b/src/Subtitles/RTS.cpp index dd58bd0fa..ef09e930c 100644 --- a/src/Subtitles/RTS.cpp +++ b/src/Subtitles/RTS.cpp @@ -3205,23 +3205,12 @@ CSubtitle* CRenderedTextSubtitle::GetSubtitle(int entry) marginRect.right = (int)(sub->m_scalex*marginRect.right*8);
marginRect.bottom = (int)(sub->m_scaley*marginRect.bottom*8);
- if(stss.relativeTo == 1) {// relative adaptation to video size on screen, extra adaptation for aspect ratios over 2
- size_t w = m_vidrect.right-m_vidrect.left, h = m_vidrect.bottom-m_vidrect.top;
- if(w > h<<1) {// aspect ratio w:h over 2
- marginRect.left += m_vidrect.left;
- marginRect.top = m_vidrect.top;
- marginRect.right += m_size.cx - m_vidrect.right;
- marginRect.bottom = m_size.cy - m_vidrect.bottom;}
- else if (h > w<<1) {// aspect ratio h:w over 2
- marginRect.left = m_vidrect.left;
- marginRect.top += m_vidrect.top;
- marginRect.right = m_size.cx - m_vidrect.right;
- marginRect.bottom += m_size.cy - m_vidrect.bottom;}
- else {
- marginRect.left += m_vidrect.left;
- marginRect.top += m_vidrect.top;
- marginRect.right += m_size.cx - m_vidrect.right;
- marginRect.bottom += m_size.cy - m_vidrect.bottom;}}
+ if(stss.relativeTo == 1) {
+ marginRect.left += m_vidrect.left;
+ marginRect.top += m_vidrect.top;
+ marginRect.right += m_size.cx - m_vidrect.right;
+ marginRect.bottom += m_size.cy - m_vidrect.bottom;
+ }
sub->CreateClippers(m_size);
|