From 271487328aa78570c70bffc62620ba840c924174 Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 6 Nov 2007 21:05:38 +0000 Subject: [PATCH] move event_mgr and view_mgr bundle right before the requestRedraw() This fixes the last jitter problems with views attached to MP/AI objects, and doesn't seem to cause any new ones. --- src/Main/main.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 13ac801ef..531bd71ef 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -489,11 +489,6 @@ static void fgMainLoop( void ) { "Elapsed time is zero ... we're zinging" ); } - globals->get_event_mgr()->update(delta_time_sec); - - // update the view angle - globals->get_viewmgr()->update(delta_time_sec); - // Do any I/O channel work that might need to be done globals->get_io()->update( real_delta_time_sec ); @@ -665,6 +660,12 @@ static void fgMainLoop( void ) { globals->get_soundmgr()->set_volume(init_volume); } + // run Nasal's settimer() loops right before the view manager + globals->get_event_mgr()->update(delta_time_sec); + + // update the view angle + globals->get_viewmgr()->update(delta_time_sec); + fgRequestRedraw(); SG_LOG( SG_ALL, SG_DEBUG, "" );