From: andy Date: Wed, 9 Nov 2005 20:34:14 +0000 (+0000) Subject: Architectural fix allowing the "tip" popups (FOV, view name, etc...) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=61f2f4b7618660e939be721b8bf425819657daa0;p=simgear.git 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. --- diff --git a/simgear/structure/event_mgr.cxx b/simgear/structure/event_mgr.cxx index c66f00ce..a62e83f9 100644 --- a/simgear/structure/event_mgr.cxx +++ b/simgear/structure/event_mgr.cxx @@ -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); } //////////////////////////////////////////////////////////////////////// diff --git a/simgear/structure/event_mgr.hxx b/simgear/structure/event_mgr.hxx index 4c89b060..66face68 100644 --- a/simgear/structure/event_mgr.hxx +++ b/simgear/structure/event_mgr.hxx @@ -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; };