mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
* remark 1: The setup values tagged GlobalIndexAbuseMode are subject of change * remark 2: Fixed some comments / Doxygen with this here
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
#include "fsxsimulatorsetup.h"
|
|
|
|
#include "../../blackmisc/project.h"
|
|
#include "../fsx/simconnectutilities.h"
|
|
#include <QSettings>
|
|
|
|
using namespace BlackMisc;
|
|
|
|
namespace BlackSim
|
|
{
|
|
namespace Fsx
|
|
{
|
|
void CFsxSimulatorSetup::init()
|
|
{
|
|
CSimulatorSetup::init();
|
|
this->m_setup.addValue(SetupSimConnectCfgFile, CSimConnectUtilities::getLocalSimConnectCfgFilename());
|
|
|
|
if (CProject::isCompiledWithFsxSupport())
|
|
{
|
|
// set FSX path
|
|
QSettings fsxRegistry("HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft Games\\Flight Simulator\\10.0", QSettings::NativeFormat);
|
|
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, QVariant(fsxPath));
|
|
}
|
|
}
|
|
} // namespace
|
|
} // namespace
|