mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
refs #358, using utility function in setup class
This commit is contained in:
@@ -10,10 +10,13 @@
|
|||||||
#include "fsxsimulatorsetup.h"
|
#include "fsxsimulatorsetup.h"
|
||||||
|
|
||||||
#include "../../blackmisc/project.h"
|
#include "../../blackmisc/project.h"
|
||||||
|
#include "../fscommon/fscommonutil.h"
|
||||||
#include "../fsx/simconnectutilities.h"
|
#include "../fsx/simconnectutilities.h"
|
||||||
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackSim::FsCommon;
|
||||||
|
|
||||||
namespace BlackSim
|
namespace BlackSim
|
||||||
{
|
{
|
||||||
@@ -27,14 +30,7 @@ namespace BlackSim
|
|||||||
if (CProject::isCompiledWithFsxSupport())
|
if (CProject::isCompiledWithFsxSupport())
|
||||||
{
|
{
|
||||||
// set FSX path
|
// set FSX path
|
||||||
QSettings fsxRegistry("HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft Games\\Flight Simulator\\10.0", QSettings::NativeFormat);
|
QString fsxPath = CFsCommonUtil::fsxDirFromRegistry();
|
||||||
QString fsxPath = fsxRegistry.value("AppPath").toString();
|
|
||||||
if (fsxPath.isEmpty())
|
|
||||||
{
|
|
||||||
// another trial
|
|
||||||
QSettings fsxRegistry("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft Games\\Flight Simulator\\10.0", QSettings::NativeFormat);
|
|
||||||
fsxPath = fsxRegistry.value("SetupPath").toString();
|
|
||||||
}
|
|
||||||
if (!fsxPath.isEmpty()) this->m_setup.value(CSimulatorSetup::SetupSimPath, CVariant(fsxPath));
|
if (!fsxPath.isEmpty()) this->m_setup.value(CSimulatorSetup::SetupSimPath, CVariant(fsxPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user