Added missing MINFONTSIZE and MAXFONTSIZE defines.

This commit is contained in:
Rolf Ahrenberg 2009-06-18 23:05:30 +03:00
parent cbc39db870
commit 55b5e0c293
1 changed files with 9 additions and 1 deletions

View File

@ -116,6 +116,14 @@
#define OSDCLEARINFO() \ #define OSDCLEARINFO() \
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT) - 1, clrTransparent) m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT) - 1, clrTransparent)
#ifndef MINFONTSIZE
#define MINFONTSIZE 10
#endif
#ifndef MAXFONTSIZE
#define MAXFONTSIZE 64
#endif
class cFemonDummyFont : public cFont { class cFemonDummyFont : public cFont {
public: public:
virtual int Width(uint c) const { return 10; } virtual int Width(uint c) const { return 10; }
@ -158,7 +166,7 @@ cFemonOsd::cFemonOsd()
{ {
Dprintf("%s()\n", __PRETTY_FUNCTION__); Dprintf("%s()\n", __PRETTY_FUNCTION__);
m_SvdrpConnection.handle = -1; m_SvdrpConnection.handle = -1;
m_Font = cFont::CreateFont(Setup.FontSml, min(max(Setup.FontSmlSize, 10), 64)); m_Font = cFont::CreateFont(Setup.FontSml, min(max(Setup.FontSmlSize, MINFONTSIZE), MAXFONTSIZE));
if (!m_Font || !m_Font->Height()) { if (!m_Font || !m_Font->Height()) {
m_Font = new cFemonDummyFont; m_Font = new cFemonDummyFont;
esyslog("ERROR: cFemonOsd::cFemonOsd() cannot create required font."); esyslog("ERROR: cFemonOsd::cFemonOsd() cannot create required font.");