mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #661, default value for enabled simulators
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define BLACKCORE_SETTINGS_APPLICATION_H
|
||||
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/input/actionhotkeylist.h"
|
||||
#include <QStringList>
|
||||
|
||||
@@ -51,14 +52,35 @@ namespace BlackCore
|
||||
static const QStringList &defaultValue()
|
||||
{
|
||||
// All default simulators
|
||||
static const QStringList enabledSimulators
|
||||
static const QStringList enabledSimulators(defaultValueImpl());
|
||||
return enabledSimulators;
|
||||
}
|
||||
|
||||
private:
|
||||
//! Determine default value
|
||||
static QStringList defaultValueImpl()
|
||||
{
|
||||
if (BlackConfig::CBuildConfig::isRunningOnWindows10())
|
||||
{
|
||||
// On WIN10 we have no direct play, so disable FS9 as per default
|
||||
return QStringList
|
||||
{
|
||||
QStringLiteral("org.swift-project.plugins.simulator.fsx"),
|
||||
QStringLiteral("org.swift-project.plugins.simulator.xplane")
|
||||
};
|
||||
}
|
||||
else if (BlackConfig::CBuildConfig::isRunningOnUnixPlatform())
|
||||
{
|
||||
// On UNIX we likely run XP
|
||||
return QStringList { QStringLiteral("org.swift-project.plugins.simulator.xplane") };
|
||||
}
|
||||
|
||||
return QStringList
|
||||
{
|
||||
QStringLiteral("org.swift-project.plugins.simulator.fs9"),
|
||||
QStringLiteral("org.swift-project.plugins.simulator.fsx"),
|
||||
QStringLiteral("org.swift-project.plugins.simulator.xplane")
|
||||
};
|
||||
|
||||
return enabledSimulators;
|
||||
}
|
||||
};
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user