#include <simgear/constants.h>
#include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props_io.hxx>
#include <osg/GLU>
#include <Main/globals.hxx>
#include "HUD.hxx"
+using std::endl;
+using std::ifstream;
static float clamp(float f)
{
const int MAXNEST = 10;
SGPath path(globals->resolve_maybe_aircraft_path(file));
+ if (path.isNull())
+ {
+ SG_LOG(SG_INPUT, SG_ALERT, "HUD: Cannot find configuration file '" << file << "'.");
+ return 0x2;
+ }
if (!level) {
SG_LOG(SG_INPUT, TREE, endl << "load " << file);
int ret = 0;
ifstream input(path.c_str());
if (!input.good()) {
- SG_LOG(SG_INPUT, SG_ALERT, "HUD: Cannot read configuration from " << path.str());
+ SG_LOG(SG_INPUT, SG_ALERT, "HUD: Cannot read configuration from '" << path.c_str() << "'");
return 0x4;
}