mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
Refs #868 Use CXPlaneUtil::xplaneRootDir() in the X-Plane plugin
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f25d569ae8
commit
99c792dd4b
@@ -140,17 +140,9 @@ namespace BlackMisc
|
|||||||
return xbusLegacy;
|
return xbusLegacy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!xplane10Dir().isEmpty())
|
|
||||||
{
|
for (auto func: {&CXPlaneUtil::xplane11Dir, &CXPlaneUtil::xplane10Dir, &CXPlaneUtil::xplane9Dir}) {
|
||||||
QString xbusLegacy = xplane10Dir() + legacyPath;
|
QString xbusLegacy = func() + legacyPath;
|
||||||
if (QDir(xbusLegacy).exists())
|
|
||||||
{
|
|
||||||
return xbusLegacy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!xplane9Dir().isEmpty())
|
|
||||||
{
|
|
||||||
QString xbusLegacy = xplane9Dir() + legacyPath;
|
|
||||||
if (QDir(xbusLegacy).exists())
|
if (QDir(xbusLegacy).exists())
|
||||||
{
|
{
|
||||||
return xbusLegacy;
|
return xbusLegacy;
|
||||||
|
|||||||
@@ -83,9 +83,7 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
void CSimulatorXPlaneConfigWindow::ps_installXBus()
|
void CSimulatorXPlaneConfigWindow::ps_installXBus()
|
||||||
{
|
{
|
||||||
QString xPlaneLocation = BlackMisc::Simulation::XPlane::CXPlaneUtil::xplane10Dir();
|
QString xPlaneLocation = BlackMisc::Simulation::XPlane::CXPlaneUtil::xplaneRootDir();
|
||||||
if (xPlaneLocation.isEmpty())
|
|
||||||
xPlaneLocation = BlackMisc::Simulation::XPlane::CXPlaneUtil::xplane9Dir();
|
|
||||||
|
|
||||||
QString path = QFileDialog::getExistingDirectory(parentWidget(),
|
QString path = QFileDialog::getExistingDirectory(parentWidget(),
|
||||||
tr("Choose your X-Plane install directory"),
|
tr("Choose your X-Plane install directory"),
|
||||||
|
|||||||
Reference in New Issue
Block a user