Make v2 HUD a top-level subsystem, so it can be reinit()ed correctly.
This commit is contained in:
parent
957a59e57a
commit
984900d84d
2 changed files with 3 additions and 4 deletions
|
@ -55,7 +55,8 @@ FGInstrumentMgr::FGInstrumentMgr () :
|
||||||
_explicitGps(false)
|
_explicitGps(false)
|
||||||
{
|
{
|
||||||
set_subsystem("od_gauge", new FGODGauge);
|
set_subsystem("od_gauge", new FGODGauge);
|
||||||
set_subsystem("hud", new HUD);
|
|
||||||
|
globals->add_subsystem("hud", new HUD, SGSubsystemMgr::DISPLAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
FGInstrumentMgr::~FGInstrumentMgr ()
|
FGInstrumentMgr::~FGInstrumentMgr ()
|
||||||
|
|
|
@ -89,7 +89,6 @@
|
||||||
#include <Scenery/redout.hxx>
|
#include <Scenery/redout.hxx>
|
||||||
#include <Scenery/tilemgr.hxx>
|
#include <Scenery/tilemgr.hxx>
|
||||||
#include <GUI/new_gui.hxx>
|
#include <GUI/new_gui.hxx>
|
||||||
#include <Instrumentation/instrument_mgr.hxx>
|
|
||||||
#include <Instrumentation/HUD/HUD.hxx>
|
#include <Instrumentation/HUD/HUD.hxx>
|
||||||
#include <Environment/precipitation_mgr.hxx>
|
#include <Environment/precipitation_mgr.hxx>
|
||||||
|
|
||||||
|
@ -209,8 +208,7 @@ public:
|
||||||
|
|
||||||
fgCockpitUpdate(&state);
|
fgCockpitUpdate(&state);
|
||||||
|
|
||||||
FGInstrumentMgr *instr = static_cast<FGInstrumentMgr*>(globals->get_subsystem("instrumentation"));
|
HUD *hud = static_cast<HUD*>(globals->get_subsystem("hud"));
|
||||||
HUD *hud = static_cast<HUD*>(instr->get_subsystem("hud"));
|
|
||||||
hud->draw(state);
|
hud->draw(state);
|
||||||
|
|
||||||
// update the panel subsystem
|
// update the panel subsystem
|
||||||
|
|
Loading…
Reference in a new issue