Architectural fix allowing the "tip" popups (FOV, view name, etc...)

to pop themselves down while the simulator is paused.

The problem was with the "real time" queue in the event manager,
causing the third argument of Nasal's settimer() (a flag for "sim
time") to be ignored.  Inverts the default sense of the argument, as
there are lots of uses of settimer() in the current code, almost none
of which want to use real time.

Note this fix introduces a header file incompatibility in SimGear --
be sure to update.
This commit is contained in:
andy
2005-11-09 20:34:14 +00:00
parent baa2f49b14
commit 61f2f4b761
2 changed files with 8 additions and 6 deletions

View File

@@ -35,9 +35,10 @@ void SGTimer::run()
void SGEventMgr::update(double delta_time_sec)
{
_rtQueue.update(delta_time_sec);
if(!_freezeProp || _freezeProp->getBoolValue() == false)
_simQueue.update(delta_time_sec);
_simQueue.update(delta_time_sec);
double rt = _rtProp ? _rtProp->getDoubleValue() : 0;
_rtQueue.update(rt);
}
////////////////////////////////////////////////////////////////////////

View File

@@ -62,13 +62,13 @@ private:
class SGEventMgr : public SGSubsystem
{
public:
SGEventMgr() { _freezeProp = 0; }
~SGEventMgr() { _freezeProp = 0; }
SGEventMgr() { _rtProp = 0; }
~SGEventMgr() { _rtProp = 0; }
virtual void init() {}
virtual void update(double delta_time_sec);
void setFreezeProperty(SGPropertyNode* node) { _freezeProp = node; }
void setRealtimeProperty(SGPropertyNode* node) { _rtProp = node; }
/**
* Add a single function callback event as a repeating task.
@@ -116,6 +116,7 @@ private:
bool repeat, bool simtime);
SGPropertyNode* _freezeProp;
SGPropertyNode* _rtProp;
SGTimerQueue _rtQueue;
SGTimerQueue _simQueue;
};