diff options
author | phintuka <phintuka> | 2008-04-12 20:45:29 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-04-12 20:45:29 +0000 |
commit | bd7e345faaa082979716d1938637aa102b8ddfb9 (patch) | |
tree | e5fd238e20a3a372528b0ddd88d17b99ade1a1a7 | |
parent | f031cd8f5164e19af162cefdf8747519b21eae65 (diff) | |
download | xineliboutput-bd7e345faaa082979716d1938637aa102b8ddfb9.tar.gz xineliboutput-bd7e345faaa082979716d1938637aa102b8ddfb9.tar.bz2 |
Improved HD OSD size calculation
(Patch from Petri Helin)
-rw-r--r-- | osd.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd.c,v 1.20 2008-04-04 20:40:29 phintuka Exp $ + * $Id: osd.c,v 1.21 2008-04-12 20:45:29 phintuka Exp $ * */ @@ -254,7 +254,11 @@ cXinelibOsd::cXinelibOsd(cXinelibDevice *Device, int x, int y, uint Level) m_Refresh = false; m_IsVisible = true; m_Layer = Level; - CmdSize(720, 576); + if(Setup.OSDWidth + (2*Setup.OSDLeft) > 720 || Setup.OSDHeight + (2*Setup.OSDTop) > 576) { + CmdSize(Setup.OSDWidth + (2*Setup.OSDLeft), Setup.OSDHeight + (2*Setup.OSDTop)); + } else { + CmdSize(720, 576); + } } cXinelibOsd::~cXinelibOsd() @@ -284,9 +288,9 @@ eOsdError cXinelibOsd::SetAreas(const tArea *Areas, int NumAreas) if(Left() + Width() > 720 || Top() + Height() > 576) { LOGDBG("Detected HD OSD, size > %dx%d, using setup values %dx%d", - Left() + Width(), Top() + Height(), - Setup.OSDWidth, Setup.OSDHeight); - CmdSize(Setup.OSDWidth, Setup.OSDHeight); + 2*Left() + Width(), 2*Top() + Height(), + Setup.OSDWidth + (2*Setup.OSDLeft), Setup.OSDHeight + (2*Setup.OSDTop)); + CmdSize(Setup.OSDWidth + (2*Setup.OSDLeft), Setup.OSDHeight + (2*Setup.OSDTop)); } else { CmdSize(720, 576); } |