throw exception();
}
+ // see if we got a valid fgdata path
+ SGPath BaseCheck(ApplicationProperties::root);
+ BaseCheck.append("version");
+ if (!BaseCheck.exists())
+ {
+ cerr << "Missing base package. Use --fg-root=path_to_fgdata" << endl;
+ throw exception();
+ }
+
try {
SGPath tpath = ApplicationProperties::GetRootPath( panelFilename.c_str() );
readProperties( tpath.str(), ApplicationProperties::Properties );
if( n == NULL ) return def;
return n->getDoubleValue();
}
+
SGPath ApplicationProperties::GetRootPath( const char * sub )
{
+ SGPath subpath( sub );
+ if ( subpath.isAbsolute() )
+ return subpath;
SGPath path( ApplicationProperties::root );
if( sub != NULL )
path.append( sub );
transform();
text_renderer.setFont(ApplicationProperties::fontCache.getTexFont(_font_name.c_str()));
+ if (!text_renderer.getFont())
+ {
+ SG_LOG( SG_COCKPIT, SG_ALERT, "Missing font file: " << _font_name );
+ return;
+ }
text_renderer.setPointSize(_pointSize);
text_renderer.begin();