dont start neutrino if font not found

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@414 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 7c435d821c
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-02-25 (Thu, 25 Feb 2010)



------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2010-02-25 14:08:05 +00:00
parent 57de1acca3
commit 3c0280633a

View File

@@ -1977,12 +1977,19 @@ void CNeutrinoApp::SetupFonts()
printf("[neutrino] settings font file %s\n", g_settings.font_file);
if(access(g_settings.font_file, F_OK)) {
font.filename = strdup(FONTDIR"/neutrino.ttf");
strcpy(g_settings.font_file, font.filename);
}
else
font.filename = strdup(g_settings.font_file);
if(!access(FONTDIR"/neutrino.ttf", F_OK)){
font.filename = strdup(FONTDIR"/neutrino.ttf");
strcpy(g_settings.font_file, font.filename);
}
else{
fprintf( stderr,"[neutrino] font file [%s] not found\n neutrino exit\n",FONTDIR"/neutrino.ttf");
_exit(0);
}
}
else{
font.filename = strdup(g_settings.font_file);
}
style[0] = g_fontRenderer->AddFont(font.filename);
if(font.name != NULL)