diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2007-07-02 12:12:06 +0200 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2007-07-02 12:12:06 +0200 |
commit | 40650ddcf7b4142790b786e50f315dade90e8678 (patch) | |
tree | a057261ca415fd1fdd40f1b3ea0e4fc3fa547131 /config.c | |
parent | fc61e314442d22bb7886dba77380497b776fcb62 (diff) | |
download | vdr-plugin-skinenigmang-40650ddcf7b4142790b786e50f315dade90e8678.tar.gz vdr-plugin-skinenigmang-40650ddcf7b4142790b786e50f315dade90e8678.tar.bz2 |
2007-07-02: Version 0.0.5v0.0.5
- Reworked font handling in menu OSD a little bit to (hopefully) fix crashes with plugins that patch fonts.
- Updated Nederlands translation (Provided by dorpsgek @vdr-portal.de).
- Don't make info area in mainmenu too small (Requested by vdrchuck @vdr-portal.de).
- Save and restore TTF FixedFont (Reported by zulu @vdr-portal.de).
- Updated Italian translation (Provided by Gringo).
- Updated French translation (Provided by Pat @vdr-portal.de).
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -48,7 +48,7 @@ FontConfig allFontConfig[FONT_NUMFONTS] = { FONT_DETAILSDATE, "FontDetailsDate", "FontDetailsDateName" }, { FONT_DETAILSTEXT, "FontDetailsText", "FontDetailsTextName" }, { FONT_REPLAYTIMES, "FontReplayTimes", "FontReplayTimesName" }, - { FONT_FIXED, "FontFixed", "FontFixed" } + { FONT_FIXED, "FontFixed", "FontFixedName" } }; cEnigmaConfig::cEnigmaConfig() : showAuxInfo(1), showLogo(1), showVps(1), showSymbols(1), @@ -130,11 +130,13 @@ void cEnigmaConfig::SetFontsDir(const char *dir) } #endif -const cFont *cEnigmaConfig::GetFont(int id) +const cFont *cEnigmaConfig::GetFont(int id, const cFont *pFontCur) { const cFont *res = NULL; if (::Setup.UseSmallFont == 1) { // if "Use small font" == "skin dependent" if (allFonts[id].VdrId == FONT_TRUETYPE) { + if (pFontCur) // TTFs can't get patched, so it's always save to return the previous pointer + return pFontCur; if (!isempty(allFonts[id].Name)) { #ifdef HAVE_FREETYPE char *cachename; @@ -170,7 +172,7 @@ void cEnigmaConfig::SetFont(int id, const char *font) if (id >= 0 && id < FONT_NUMFONTS && font) { char *tmp = strrchr(font, ':'); if (tmp) { - strncpy(allFonts[id].Name, font, std::min((int)sizeof(allFonts[id].Name), tmp - font)); + strncpy(allFonts[id].Name, font, std::min((int)sizeof(allFonts[id].Name), (int)(tmp - font))); allFonts[id].Size = atoi(tmp + 1); tmp = strchr(tmp + 1, ','); if (tmp) { |