diff --git a/src/Instrumentation/instrument_mgr.cxx b/src/Instrumentation/instrument_mgr.cxx index 2e3f21e3f..19fcaeb06 100644 --- a/src/Instrumentation/instrument_mgr.cxx +++ b/src/Instrumentation/instrument_mgr.cxx @@ -55,7 +55,8 @@ FGInstrumentMgr::FGInstrumentMgr () : _explicitGps(false) { set_subsystem("od_gauge", new FGODGauge); - set_subsystem("hud", new HUD); + + globals->add_subsystem("hud", new HUD, SGSubsystemMgr::DISPLAY); } FGInstrumentMgr::~FGInstrumentMgr () diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index 0cb00c5ab..388701d67 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -89,7 +89,6 @@ #include #include #include -#include #include #include @@ -209,8 +208,7 @@ public: fgCockpitUpdate(&state); - FGInstrumentMgr *instr = static_cast(globals->get_subsystem("instrumentation")); - HUD *hud = static_cast(instr->get_subsystem("hud")); + HUD *hud = static_cast(globals->get_subsystem("hud")); hud->draw(state); // update the panel subsystem