From 61f2f4b7618660e939be721b8bf425819657daa0 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 9 Nov 2005 20:34:14 +0000 Subject: [PATCH] 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. --- simgear/structure/event_mgr.cxx | 7 ++++--- simgear/structure/event_mgr.hxx | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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; }; -- 2.39.5