mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
refs #585, adjusted XP utils
This commit is contained in:
@@ -55,11 +55,11 @@ namespace BlackMisc
|
||||
{
|
||||
QString result;
|
||||
TCHAR szLocalAppDataPath[MAX_PATH];
|
||||
if(SUCCEEDED(SHGetFolderPath(NULL,
|
||||
CSIDL_LOCAL_APPDATA,
|
||||
NULL,
|
||||
0,
|
||||
szLocalAppDataPath)))
|
||||
if (SUCCEEDED(SHGetFolderPath(NULL,
|
||||
CSIDL_LOCAL_APPDATA,
|
||||
NULL,
|
||||
0,
|
||||
szLocalAppDataPath)))
|
||||
{
|
||||
result = QString::fromWCharArray(szLocalAppDataPath);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ namespace BlackMisc
|
||||
QString xplaneInstallFilePath;
|
||||
QString xplaneInstallFile = QStringLiteral("/x-plane_install_10.txt");
|
||||
#if defined(Q_OS_WIN)
|
||||
xplaneInstallFilePath = getWindowsLocalAppDataPath() + xplaneInstallFile;
|
||||
xplaneInstallFilePath = getWindowsLocalAppDataPath() + xplaneInstallFile;
|
||||
#elif defined (Q_OS_UNIX)
|
||||
xplaneInstallFilePath = QDir::homePath() + QStringLiteral("/.x-plane") + xplaneInstallFile;
|
||||
#elif defined (Q_OS_OSX)
|
||||
@@ -102,6 +102,16 @@ namespace BlackMisc
|
||||
else { return {}; }
|
||||
}
|
||||
|
||||
QString CXPlaneUtil::xplaneModelDirectory()
|
||||
{
|
||||
return xplaneRootDir();
|
||||
}
|
||||
|
||||
QStringList CXPlaneUtil::xplaneModelExcludeDirectoryPatterns()
|
||||
{
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
QString CXPlaneUtil::xbusLegacyDir()
|
||||
{
|
||||
QString legacyPath("/Resources/plugins/xbus/LegacyData");
|
||||
|
||||
@@ -41,10 +41,16 @@ namespace BlackMisc
|
||||
//! In case more then one XPlane version is found, the path to the highest version is used
|
||||
static QString xplaneRootDir();
|
||||
|
||||
//! Directory with models
|
||||
//! \todo needs review
|
||||
static QString xplaneModelDirectory();
|
||||
|
||||
//! Exclude directories for models
|
||||
static QStringList xplaneModelExcludeDirectoryPatterns();
|
||||
|
||||
//! XBus legacy directory
|
||||
static QString xbusLegacyDir();
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user