From a056f044df6abf32ce5fb663cf5ad302acbe46b8 Mon Sep 17 00:00:00 2001
From: Stone <syphyr@gmail.com>
Date: Sat, 3 Jan 2009 21:50:31 +0200
Subject: Make compatible with VDR >= 1.5.7.

---
 font.c | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'font.c')

diff --git a/font.c b/font.c
index 7042da9..706ab23 100644
--- a/font.c
+++ b/font.c
@@ -31,8 +31,13 @@ const cFont *cText2SkinFont::Load(const std::string &Path, const std::string &Fi
 	const cFont *res = NULL;
 #ifdef HAVE_FREETYPE
 	char *cachename;
+#if VDRVERSNUM >= 10507
+	asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, I18nCurrentLanguage());
+	if (mFontCache.Load(Path + "/" + Filename, cachename, Size, I18nCurrentLanguage(), Width))
+#else
 	asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, Setup.OSDLanguage);
 	if (mFontCache.Load(Path + "/" + Filename, cachename, Size, Setup.OSDLanguage, Width))
+#endif
 		res = mFontCache.GetFont(cachename);
 	else
 		esyslog("ERROR: Text2Skin: Couldn't load font %s:%d", Filename.c_str(), Size);
-- 
cgit v1.2.3