Utility method to get XPlane root directory

This commit is contained in:
Roland Winklmeier
2016-02-03 23:52:56 +01:00
parent 97a12d955d
commit 7cac547f1e
2 changed files with 11 additions and 0 deletions

View File

@@ -91,6 +91,13 @@ namespace BlackMisc
return getLastExistingPathFromFile(xplaneInstallFilePath);
}
QString CXPlaneUtil::xplaneRootDir()
{
if (!xplane10Dir().isEmpty()) { return xplane10Dir(); }
else if (!xplane9Dir().isEmpty()) { return xplane9Dir(); }
else { return {}; }
}
QString CXPlaneUtil::xbusLegacyDir()
{
QString legacyPath("/Resources/plugins/xbus/LegacyData");

View File

@@ -36,6 +36,10 @@ namespace BlackMisc
//! \todo Test on OSX
static QString xplane10Dir();
//! XPlane root directory
//! In case more then one XPlane version is found, the path to the highest version is used
static QString xplaneRootDir();
//! XBus legacy directory
static QString xbusLegacyDir();
};