Add initial simulator plugin support for FS2020

This adds simulator plugin support for FS2020. It still pretends to be FSX until full integration is completed.
This commit is contained in:
Roland Rossgotterer
2020-09-12 13:19:38 +02:00
committed by Mat Sutcliffe
parent aa32544b53
commit 3baab2ae4d
15 changed files with 298 additions and 5 deletions

View File

@@ -84,6 +84,11 @@ namespace BlackMisc
return getSimulator().testFlag(FG);
}
bool CSimulatorInfo::isFS2020() const
{
return getSimulator().testFlag(FS2020);
}
bool CSimulatorInfo::isAnySimulator() const
{
return isFSX() || isFS9() || isXPlane() || isP3D() || isFG();
@@ -260,6 +265,7 @@ namespace BlackMisc
{
s |= P3D;
}
if (i.contains("fs2020")) { s |= FS2020; }
return s;
}

View File

@@ -54,9 +54,10 @@ namespace BlackMisc
XPLANE = 1 << 2,
P3D = 1 << 3,
FG = 1 << 4,
FS2020 = 1 << 5,
FSX_P3D = FSX | P3D,
AllFsFamily = FSX | FS9 | P3D,
All = FSX | FS9 | XPLANE | P3D | FG
AllFsFamily = FSX | FS9 | P3D | FS2020,
All = FSX | FS9 | XPLANE | P3D | FG | FS2020
};
Q_DECLARE_FLAGS(Simulator, SimulatorFlag)
@@ -99,6 +100,9 @@ namespace BlackMisc
//! FG?
bool isFG() const;
//! FS2020?
bool isFS2020() const;
//! Any simulator?
bool isAnySimulator() const;

View File

@@ -97,6 +97,12 @@ namespace BlackMisc
return s;
}
const QString &CSimulatorPluginInfo::fs2020PluginIdentifier()
{
static const QString s("org.swift-project.plugins.simulator.fs2020");
return s;
}
const QString &CSimulatorPluginInfo::emulatedPluginIdentifier()
{
static const QString s("org.swift-project.plugins.simulator.emulated");
@@ -112,7 +118,8 @@ namespace BlackMisc
xplanePluginIdentifier(),
fs9PluginIdentifier(),
emulatedPluginIdentifier(),
fgPluginIdentifier()
fgPluginIdentifier(),
fs2020PluginIdentifier()
});
return identifiers;
}
@@ -128,6 +135,7 @@ namespace BlackMisc
return QStringList
{
fsxPluginIdentifier(),
fs2020PluginIdentifier(),
p3dPluginIdentifier(),
xplanePluginIdentifier(),
fgPluginIdentifier()

View File

@@ -85,6 +85,9 @@ namespace BlackMisc
//! Plugin identifier (FlightGear)
static const QString &fgPluginIdentifier();
//! Plugin identifier (FS2020)
static const QString &fs2020PluginIdentifier();
//! Plugin identifier (emulated simulator plugin)
static const QString &emulatedPluginIdentifier();