git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix label background
[enigma2.git]
/
main
/
enigma.cpp
diff --git
a/main/enigma.cpp
b/main/enigma.cpp
index f7cf44e052b0dd2e196e9215d8c464b02aadf2e9..f9b88e7f0e1e4892427d81faed16532fdf7dc80a 100644
(file)
--- a/
main/enigma.cpp
+++ b/
main/enigma.cpp
@@
-105,6
+105,10
@@
int exit_code;
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
+#ifdef MEMLEAK_CHECK
+ atexit(DumpUnfreed);
+#endif
+
#ifdef OBJECT_DEBUG
atexit(object_dump);
#endif
#ifdef OBJECT_DEBUG
atexit(object_dump);
#endif
@@
-136,10
+140,8
@@
int main(int argc, char **argv)
ePtr<gLCDDC> my_lcd_dc;
gLCDDC::getInstance(my_lcd_dc);
ePtr<gLCDDC> my_lcd_dc;
gLCDDC::getInstance(my_lcd_dc);
- fontRenderClass::getInstance()->AddFont(FONTDIR "/md_khmurabi_10.ttf", "Regular", 100);
- fontRenderClass::getInstance()->AddFont(FONTDIR "/ae_AlMateen.ttf", "Replacement", 90);
- eTextPara::setReplacementFont("Replacement");
-
+
+ /* ok, this is currently hardcoded for arabic. */
/* some characters are wrong in the regular font, force them to use the replacement font */
for (int i = 0x60c; i <= 0x66d; ++i)
eTextPara::forceReplacementGlyph(i);
/* some characters are wrong in the regular font, force them to use the replacement font */
for (int i = 0x60c; i <= 0x66d; ++i)
eTextPara::forceReplacementGlyph(i);
@@
-222,3
+224,10
@@
void quitMainloop(int exitCode)
exit_code = exitCode;
eApp->quit(0);
}
exit_code = exitCode;
eApp->quit(0);
}
+
+void addFont(const char *filename, const char *alias, int scale_factor, int is_replacement)
+{
+ fontRenderClass::getInstance()->AddFont(filename, alias, scale_factor);
+ if (is_replacement)
+ eTextPara::setReplacementFont(alias);
+}