Add /sim/initialised which is set to true when we're ready to go.
This commit is contained in:
parent
72f7595273
commit
8db96e10fb
2 changed files with 5 additions and 0 deletions
|
@ -1820,6 +1820,7 @@ void fgReInitSubsystems()
|
|||
fgSetBool("/sim/freeze/master", true);
|
||||
}
|
||||
fgSetBool("/sim/crashed", false);
|
||||
fgSetBool("/sim/initialised", false);
|
||||
|
||||
// Initialize the FDM
|
||||
fgInitFDM();
|
||||
|
@ -1843,5 +1844,6 @@ void fgReInitSubsystems()
|
|||
if ( !freeze ) {
|
||||
fgSetBool("/sim/freeze/master", false);
|
||||
}
|
||||
fgSetBool("/sim/initialised", true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1350,6 +1350,8 @@ static void fgIdleFunction ( void ) {
|
|||
// printf("idle state == %d\n", idle_state);
|
||||
|
||||
if ( idle_state == 0 ) {
|
||||
fgSetBool("sim/initialised", false);
|
||||
|
||||
// Initialize the splash screen right away
|
||||
if ( fgGetBool("/sim/startup/splash-screen") ) {
|
||||
fgSplashInit(fgGetString("/sim/startup/splash-texture"));
|
||||
|
@ -1433,6 +1435,7 @@ static void fgIdleFunction ( void ) {
|
|||
if ( idle_state == 1000 ) {
|
||||
// We've finished all our initialization steps, from now on we
|
||||
// run the main loop.
|
||||
fgSetBool("sim/initialised",true);
|
||||
|
||||
fgRegisterIdleHandler(fgMainLoop);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue