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:
@@ -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);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user