From: Erik Hofman Date: Thu, 21 Jul 2016 11:55:31 +0000 (+0200) Subject: Set /sim/rendering/initialized to true at the appropriate moment and use it instead... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3854b1ce96e6298787ee9dbc4df13e81a71fd33a;p=flightgear.git Set /sim/rendering/initialized to true at the appropriate moment and use it instead of /sim/initialized for the messagebox --- diff --git a/src/GUI/MessageBox.cxx b/src/GUI/MessageBox.cxx index 846752af8..67276448a 100644 --- a/src/GUI/MessageBox.cxx +++ b/src/GUI/MessageBox.cxx @@ -134,7 +134,7 @@ MessageBoxResult modalMessageBox(const std::string& caption, s += "\n( " + moreText + ")"; } - if (fgGetBool("/sim/initialized", false) == false) { + if (fgGetBool("/sim/rendering/initialized", false) == false) { SG_LOG(SG_GENERAL, SG_ALERT, s); } else { NewGUI* _gui = (NewGUI *)globals->get_subsystem("gui"); @@ -161,7 +161,7 @@ MessageBoxResult fatalMessageBox(const std::string& caption, if (!moreText.empty()) { s += "\n( " + moreText + ")"; } - if (fgGetBool("/sim/initialized", false) == false) { + if (fgGetBool("/sim/rendering/initialized", false) == false) { std::cerr << s << std::endl; } else { NewGUI* _gui = (NewGUI *)globals->get_subsystem("gui"); diff --git a/src/Main/main.cxx b/src/Main/main.cxx index d66d8adfe..b001a2d64 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -256,6 +256,7 @@ static void fgIdleFunction ( void ) { fgSetVideoOptions(); idle_state+=2; fgSplashProgress("loading-aircraft-list"); + fgSetBool("/sim/rendering/initialized", true); } } else if ( idle_state == 2 ) {