[MSFS] Rename FS2020 to MSFS

This commit is contained in:
Roland Rossgotterer
2021-03-16 10:07:32 +01:00
committed by Mat Sutcliffe
parent 74679137d1
commit 7e04a2c40f
16 changed files with 66 additions and 54 deletions

View File

@@ -26,7 +26,7 @@
"xplane": true,
"xswiftbus": true,
"fg": true,
"fs2020": true
"msfs": true
},
"releaseWithDebugInfo": true,
"profileRelease": false,

View File

@@ -72,11 +72,11 @@ This plugin acts as the interface between swift and FSX.</detailedDescription>
</shouldPackRuleList>
</component>
<component>
<name>fs2020</name>
<name>msfs</name>
<description>MS Flight Simulator 2020</description>
<canBeEdited>1</canBeEdited>
<detailedDescription>MS Flight Simulator 2020 Simulator Plugin
This plugin acts as the interface between swift and FS2020.</detailedDescription>
This plugin acts as the interface between swift and MSFS.</detailedDescription>
<selected>1</selected>
<show>1</show>
<folderList>
@@ -87,7 +87,7 @@ This plugin acts as the interface between swift and FS2020.</detailedDescription
<platforms>windows</platforms>
<distributionFileList>
<distributionFile>
<origin>../../dist/bin/plugins/simulator/simulatorfs2020.dll</origin>
<origin>../../dist/bin/plugins/simulator/simulatormsfs.dll</origin>
</distributionFile>
</distributionFileList>
</folder>

View File

@@ -59,7 +59,7 @@ namespace BlackCore
MSCFS3, /*!< MS Combat Flight Simulator 3 */
MSFS2004, /*!< MS Flight Simulator 2004 */
MSFSX, /*!< MS Flight Simulator X */
MSFS2020, /*!< MS Flight Simulator 2020 */
MSFS, /*!< MS Flight Simulator 2020 */
XPLANE8, /*!< X-Plane 8 */
XPLANE9, /*!< X-Plane 9 */
XPLANE10, /*!< X-Plane 10 */

View File

@@ -169,7 +169,7 @@ namespace BlackCore
// future versions
case SimType::XPLANE12:
case SimType::P3Dv5:
case SimType::MSFS2020:
case SimType::MSFS:
return "0";
}

View File

@@ -83,9 +83,9 @@ namespace BlackMisc
return getSimulator().testFlag(FG);
}
bool CSimulatorInfo::isFS2020() const
bool CSimulatorInfo::isMSFS() const
{
return getSimulator().testFlag(FS2020);
return getSimulator().testFlag(MSFS);
}
bool CSimulatorInfo::isAnySimulator() const
@@ -251,7 +251,7 @@ namespace BlackMisc
{
s |= P3D;
}
if (i.contains("fs2020")) { s |= FS2020; }
if (i.contains("msfs")) { s |= MSFS; }
return s;
}

View File

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

View File

@@ -110,9 +110,9 @@ namespace BlackMisc
return s;
}
const QString &CSimulatorPluginInfo::fs2020PluginIdentifier()
const QString &CSimulatorPluginInfo::msfsPluginIdentifier()
{
static const QString s("org.swift-project.plugins.simulator.fs2020");
static const QString s("org.swift-project.plugins.simulator.msfs");
return s;
}
@@ -132,7 +132,7 @@ namespace BlackMisc
fs9PluginIdentifier(),
emulatedPluginIdentifier(),
fgPluginIdentifier(),
fs2020PluginIdentifier()
msfsPluginIdentifier()
});
return identifiers;
}
@@ -148,7 +148,7 @@ namespace BlackMisc
return QStringList
{
fsxPluginIdentifier(),
fs2020PluginIdentifier(),
msfsPluginIdentifier(),
p3dPluginIdentifier(),
xplanePluginIdentifier(),
fgPluginIdentifier()

View File

@@ -88,8 +88,8 @@ namespace BlackMisc
//! Plugin identifier (FlightGear)
static const QString &fgPluginIdentifier();
//! Plugin identifier (FS2020)
static const QString &fs2020PluginIdentifier();
//! Plugin identifier (MSFS 2020)
static const QString &msfsPluginIdentifier();
//! Plugin identifier (emulated simulator plugin)
static const QString &emulatedPluginIdentifier();

View File

@@ -2917,9 +2917,9 @@ namespace BlackSimPlugin
// FSX drivers only works with FSX
return connectedSimName.contains("fsx") || connectedSimName.contains("microsoft") || connectedSimName.contains("simulator x");
}
else if (pluginSim.isFS2020())
else if (pluginSim.isMSFS())
{
// FS2020 drivers only works with FS2020
// MSFS 2020 drivers only works with MSFS
return connectedSimName.contains("kittyhawk");
}
return false;

View File

@@ -15,9 +15,21 @@ DESTDIR = $$DestRoot/bin/plugins/simulator
SOURCES += *.cpp
HEADERS += *.h
REQUIRES += swiftConfig(sims.fs2020)
TARGET = simulatorfs2020
DISTFILES += simulatorfs2020.json
DEFINES += SIMCONNECT_H_NOMANIFEST
equals(WORD_SIZE,64) {
SIMCONNECT_INCLUDE += $$EXTERNALSROOT/common/include/simconnect/P3D-v4
DEFINES += P3D_SDK_VERSION=400
}
equals(WORD_SIZE,32) {
SIMCONNECT_INCLUDE += $$EXTERNALSROOT/common/include/simconnect/FSX-XPack
}
INCLUDEPATH *= $$SIMCONNECT_INCLUDE
gcc:QMAKE_CXXFLAGS_WARN_ON += -isystem $$SIMCONNECT_INCLUDE
llvm:QMAKE_CXXFLAGS_WARN_ON *= $$clangArg(-isystem$$system_path($$SIMCONNECT_INCLUDE))
REQUIRES += swiftConfig(sims.msfs)
TARGET = simulatormsfs
DISTFILES += simulatormsfs.json
win32 {
dlltarget.path = $$PREFIX/bin/plugins/simulator

View File

@@ -6,7 +6,7 @@
* or distributed except according to the terms contained in the LICENSE file.
*/
#include "simulatorfs2020.h"
#include "simulatormsfs.h"
#include "../fsxcommon/simconnectsymbols.h"
using namespace BlackMisc;
@@ -21,9 +21,9 @@ using namespace BlackCore;
namespace BlackSimPlugin
{
namespace Fs2020
namespace Msfs
{
CSimulatorFs2020::CSimulatorFs2020(const CSimulatorPluginInfo &info,
CSimulatorMsFs::CSimulatorMsFs(const CSimulatorPluginInfo &info,
IOwnAircraftProvider *ownAircraftProvider,
IRemoteAircraftProvider *remoteAircraftProvider,
IWeatherGridProvider *weatherGridProvider,
@@ -40,15 +40,15 @@ namespace BlackSimPlugin
});
}
bool CSimulatorFs2020::connectTo()
bool CSimulatorMsFs::connectTo()
{
if (!loadAndResolveFsxSimConnect(true)) { return false; }
//if (!loadAndResolveFsxSimConnect(true)) { return false; }
return CSimulatorFsxCommon::connectTo();
}
void CSimulatorFs2020Listener::startImpl()
void CSimulatorMsFsListener::startImpl()
{
if (!loadAndResolveFsxSimConnect(true)) { return; }
//if (!loadAndResolveFsxSimConnect(true)) { return; }
return CSimulatorFsxCommonListener::startImpl();
}

View File

@@ -8,23 +8,23 @@
//! \file
#ifndef BLACKSIMPLUGIN_FS2020_SIMULATORFS2020_H
#define BLACKSIMPLUGIN_FS2020_SIMULATORFS2020_H
#ifndef BLACKSIMPLUGIN_MSFS_SIMULATORMSFS_H
#define BLACKSIMPLUGIN_MSFS_SIMULATORMSFS_H
#include "../fsxcommon/simulatorfsxcommon.h"
namespace BlackSimPlugin
{
namespace Fs2020
namespace Msfs
{
//! FSX simulator implementation
class CSimulatorFs2020 : public BlackSimPlugin::FsxCommon::CSimulatorFsxCommon
class CSimulatorMsFs : public BlackSimPlugin::FsxCommon::CSimulatorFsxCommon
{
Q_OBJECT
public:
//! Constructor, parameters as in \sa BlackCore::ISimulatorFactory::create
CSimulatorFs2020(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
CSimulatorMsFs(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
BlackMisc::Simulation::IRemoteAircraftProvider *remoteAircraftProvider,
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider,
@@ -37,8 +37,8 @@ namespace BlackSimPlugin
//! @}
};
//! Listener for FSX
class CSimulatorFs2020Listener : public FsxCommon::CSimulatorFsxCommonListener
//! Listener for MSFS
class CSimulatorMsFsListener : public FsxCommon::CSimulatorFsxCommonListener
{
Q_OBJECT

View File

@@ -1,5 +1,5 @@
{
"identifier" : "org.swift-project.plugins.simulator.fs2020",
"identifier" : "org.swift-project.plugins.simulator.msfs",
"name" : "Flight Simulator 2020",
"simulator" : "fsx",
"description" : "Microsoft Flight Simulator 2020"

View File

@@ -6,8 +6,8 @@
* or distributed except according to the terms contained in the LICENSE file.
*/
#include "simulatorfs2020factory.h"
#include "simulatorfs2020.h"
#include "simulatormsfsfactory.h"
#include "simulatormsfs.h"
#include "blackmisc/simulation/simulatorplugininfo.h"
using namespace BlackMisc::Network;
@@ -17,21 +17,21 @@ using namespace BlackCore;
namespace BlackSimPlugin
{
namespace Fs2020
namespace Msfs
{
ISimulator *CSimulatorFs2020Factory::create(const CSimulatorPluginInfo &info,
ISimulator *CSimulatorMsFsFactory::create(const CSimulatorPluginInfo &info,
IOwnAircraftProvider *ownAircraftProvider,
IRemoteAircraftProvider *remoteAircraftProvider,
IWeatherGridProvider *weatherGridProvider,
IClientProvider *clientProvider)
{
Q_ASSERT(ownAircraftProvider);
return new CSimulatorFs2020(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, this);
return new CSimulatorMsFs(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, this);
}
ISimulatorListener *CSimulatorFs2020Factory::createListener(const CSimulatorPluginInfo &info)
ISimulatorListener *CSimulatorMsFsFactory::createListener(const CSimulatorPluginInfo &info)
{
return new CSimulatorFs2020Listener(info);
return new CSimulatorMsFsListener(info);
}
} // namespace
} // namespace

View File

@@ -8,8 +8,8 @@
//! \file
#ifndef BLACKSIMPLUGIN_SIMULATOR_FSXFACTORY_H
#define BLACKSIMPLUGIN_SIMULATOR_FSXFACTORY_H
#ifndef BLACKSIMPLUGIN_SIMULATOR_MSFSFACTORY_H
#define BLACKSIMPLUGIN_SIMULATOR_MSFSFACTORY_H
#include "blackcore/simulator.h"
#include "blackmisc/simulation/simulatorplugininfo.h"
@@ -19,15 +19,15 @@
namespace BlackSimPlugin
{
namespace Fs2020
namespace Msfs
{
//! Factory implementation to create CSimulatorFsx instances
class CSimulatorFs2020Factory :
class CSimulatorMsFsFactory :
public QObject,
public BlackCore::ISimulatorFactory
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.swift-project.blackcore.simulatorinterface" FILE "simulatorfs2020.json")
Q_PLUGIN_METADATA(IID "org.swift-project.blackcore.simulatorinterface" FILE "simulatormsfs.json")
Q_INTERFACES(BlackCore::ISimulatorFactory)
public:

View File

@@ -34,7 +34,7 @@ swiftConfig(sims.fg) {
SUBDIRS += flightgear
SUBDIRS += flightgearconfig
}
swiftConfig(sims.fs2020) {
SUBDIRS += fs2020
swiftConfig(sims.msfs) {
SUBDIRS += msfs
}
load(common_post)