From main.cxx:

if ( idle_state == 1000 ) {

        // We've finished all our initialization steps, from now on we

        // run the main loop.

 

        fgRegisterIdleHandler(fgMainLoop);

 

idle_state appears to be declared globally, so you should be able to test straight for that:

 

bool checkinit()

{

      if (idle_state == 1000)

         {return true;}

      else

         {return false;}

}

 

Though it would make a lot more sense to add a value to the property tree in the code snippet above so that you could use fgGetBool() on it.

 

Giles Robertson  

 

> -----Original Message-----

> From: Seamus Thomas Carroll [mailto:[EMAIL PROTECTED]

> Sent: 05 May 2004 06:15

> To: [EMAIL PROTECTED]

> Subject: [Flightgear-devel] how to determine when flightgear

> hasfullyinitialized

>

> Hi,

>

> Is there a simple way to test in the code to see if flightgear has

> initialized such as a boolean?

>

> Seamus

>

>

> _______________________________________________

> Flightgear-devel mailing list

> [EMAIL PROTECTED]

> http://mail.flightgear.org/mailman/listinfo/flightgear-devel

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to