diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index efa39e94b..90f860a3c 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -389,7 +389,27 @@ private: } else { SG_LOG(SG_AIRCRAFT, SG_DEV_ALERT, "Aircraft does not specify a minimum FG version: please add one at /sim/minimum-fg-version"); } - + + auto compatNodes = globals->get_props()->getNode("/sim")->getChildren("compatible-fg-version"); + if (!compatNodes.empty()) { + bool showCompatWarning = true; + + // if we have at least one compatibility node, then it needs to match + for (const auto& cn : compatNodes) { + const auto v = cn->getStringValue(); + if (simgear::strutils::compareVersionToWildcard(FLIGHTGEAR_VERSION, v)) { + showCompatWarning = false; + break; + } + } + + if (showCompatWarning) { + flightgear::modalMessageBox("Aircraft not compatible with this version", + "The selected aircraft has not been checked for compatability with this version of FlightGear (" FLIGHTGEAR_VERSION "). " + "Some aircraft features might not work, or might be displayed incorrectly."); + } + } + return true; }