]> git.mxchange.org Git - flightgear.git/commitdiff
Don't call idle and draw functions from FGEventHandler::handle.
authortimoore <timoore>
Thu, 20 Nov 2008 11:01:05 +0000 (11:01 +0000)
committertimoore <timoore>
Thu, 20 Nov 2008 11:01:05 +0000 (11:01 +0000)
These functions are now called in fgOSMainLoop. The fgMainLoop
function was being called twice, which resulted in a slow-down, but
also caused the displayed frame rate to double!

src/Main/FGEventHandler.cxx

index 16babdeada1ff98ce6949fc2ccfef12292708c39..e4d1d104308c8cb478b9d7280256286276822d52 100644 (file)
@@ -147,10 +147,6 @@ bool FGEventHandler::handle(const osgGA::GUIEventAdapter& ea,
 
     switch (ea.getEventType()) {
     case osgGA::GUIEventAdapter::FRAME:
-        if (idleHandler)
-            (*idleHandler)();
-        if (drawHandler)
-            (*drawHandler)();
         mouseWarped = false;
         handleStats(us);
         return true;