summaryrefslogtreecommitdiff
path: root/plugins/text2skin/patches/p1/text2skin-1.1-cvs_ext-0.10_vdr154.diff
blob: c01f9d07256082d08fae7bd91ad44046129caf5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff -ruN text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.c text2skin-1.1-cvs_ext-0.10/graphtft/font.c
--- text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.c	2007-06-19 19:56:34.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10/graphtft/font.c	2007-06-19 19:49:59.000000000 -0700
@@ -38,6 +38,7 @@
 
 bool cGraphtftFont::Load(string Filename, string CacheName, int Size, int Language, int Width, int format)
 {
+#if VDRVERSNUM < 10503
 	if ( _cache.find(CacheName) != _cache.end() )
 		return true;	
 	
@@ -187,6 +188,15 @@
 	delete(font_data);
 	// Something went wrong!
 	return false;
+#else
+    if ( _cache.find(CacheName) != _cache.end() )
+        return true;
+    cFont* newFont = cFont::CreateFont(Filename.c_str(), Size);
+    if ( newFont == NULL )
+        return false;
+    _cache[CacheName] = newFont;
+    return true;
+#endif
 }
 
 const cFont* cGraphtftFont::GetFont(string CacheName){
@@ -210,10 +220,12 @@
 		delete((*it).second);
 	_cache.clear();
 
+#if VDRVERSNUM < 10503
 	del_map::iterator del_it = _del.begin();
 	for (; del_it != _del.end(); ++del_it)
 		delete((*del_it).second);
 	_del.clear();
+#endif
 }
 				
 cGraphtftFont GraphtftFont;
diff -ruN text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.h text2skin-1.1-cvs_ext-0.10/graphtft/font.h
--- text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.h	2007-06-19 19:56:34.000000000 -0700
+++ text2skin-1.1-cvs_ext-0.10/graphtft/font.h	2007-06-11 17:43:26.000000000 -0700
@@ -24,7 +24,9 @@
 {
 private:
 	typedef map<string,cFont*> cache_map;
+#if VDRVERSNUM < 10503
 	typedef map<string,cFont::tPixelData*> del_map;
+#endif
 	
 public:
 	cGraphtftFont();
@@ -40,7 +42,9 @@
 	FT_Face			_face;
 	FT_GlyphSlot		_slot;
 	cache_map 		_cache;
+#if VDRVERSNUM < 10503
 	del_map			_del;
+#endif
 
 };