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
This commit is contained in:
satbaby
2010-02-25 14:08:05 +00:00
parent af3cea6ba8
commit 7c435d821c

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)