1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed scaling subtitles in case the OSD size is exactly the same as the display size of the subtitles

This commit is contained in:
Klaus Schmidinger 2011-03-27 14:12:58 +02:00
parent 48d2caa73e
commit 1387660744
2 changed files with 13 additions and 5 deletions

View File

@ -6580,3 +6580,5 @@ Video Disk Recorder Revision History
- Fixed the description of cReceiver in PLUGINS.html, regarding detaching a receiver
from its device before deleting it (reported by Winfried Köhler). This change in
behavior was introduced in version 1.5.7.
- Fixed scaling subtitles in case the OSD size is exactly the same as the display
size of the subtitles.

View File

@ -7,7 +7,7 @@
* Original author: Marco Schlüßler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
*
* $Id: dvbsubtitle.c 2.14 2011/03/27 11:52:42 kls Exp $
* $Id: dvbsubtitle.c 2.15 2011/03/27 13:52:58 kls Exp $
*/
#include "dvbsubtitle.h"
@ -870,10 +870,16 @@ void cDvbSubtitleConverter::SetOsdData(void)
double VideoAspect;
cDevice::PrimaryDevice()->GetOsdSize(OsdWidth, OsdHeight, OsdAspect);
cDevice::PrimaryDevice()->GetVideoSize(VideoWidth, VideoHeight, VideoAspect);
if (OsdWidth == displayWidth && OsdHeight == displayHeight) {
osdFactorX = osdFactorY = 1.0;
osdDeltaX = osdDeltaY = 0;
}
else {
osdFactorX = VideoAspect * OsdHeight / displayWidth;
osdFactorY = double(OsdHeight) / displayHeight;
osdDeltaX = (OsdWidth - displayWidth * osdFactorX) / 2;
osdDeltaY = (OsdHeight - displayHeight * osdFactorY) / 2;
}
}
bool cDvbSubtitleConverter::AssertOsd(void)