1
0
Fork 0

Add /sim/initialised which is set to true when we're ready to go.

This commit is contained in:
ehofman 2004-05-05 09:01:21 +00:00
parent 72f7595273
commit 8db96e10fb
2 changed files with 5 additions and 0 deletions

View file

@ -1820,6 +1820,7 @@ void fgReInitSubsystems()
fgSetBool("/sim/freeze/master", true); fgSetBool("/sim/freeze/master", true);
} }
fgSetBool("/sim/crashed", false); fgSetBool("/sim/crashed", false);
fgSetBool("/sim/initialised", false);
// Initialize the FDM // Initialize the FDM
fgInitFDM(); fgInitFDM();
@ -1843,5 +1844,6 @@ void fgReInitSubsystems()
if ( !freeze ) { if ( !freeze ) {
fgSetBool("/sim/freeze/master", false); fgSetBool("/sim/freeze/master", false);
} }
fgSetBool("/sim/initialised", true);
} }

View file

@ -1350,6 +1350,8 @@ static void fgIdleFunction ( void ) {
// printf("idle state == %d\n", idle_state); // printf("idle state == %d\n", idle_state);
if ( idle_state == 0 ) { if ( idle_state == 0 ) {
fgSetBool("sim/initialised", false);
// Initialize the splash screen right away // Initialize the splash screen right away
if ( fgGetBool("/sim/startup/splash-screen") ) { if ( fgGetBool("/sim/startup/splash-screen") ) {
fgSplashInit(fgGetString("/sim/startup/splash-texture")); fgSplashInit(fgGetString("/sim/startup/splash-texture"));
@ -1433,6 +1435,7 @@ static void fgIdleFunction ( void ) {
if ( idle_state == 1000 ) { if ( idle_state == 1000 ) {
// We've finished all our initialization steps, from now on we // We've finished all our initialization steps, from now on we
// run the main loop. // run the main loop.
fgSetBool("sim/initialised",true);
fgRegisterIdleHandler(fgMainLoop); fgRegisterIdleHandler(fgMainLoop);
} else { } else {