mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
[MSFS] Rename FS2020 to MSFS
This commit is contained in:
committed by
Mat Sutcliffe
parent
74679137d1
commit
7e04a2c40f
@@ -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;
|
||||
|
||||
@@ -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
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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:
|
||||
@@ -34,7 +34,7 @@ swiftConfig(sims.fg) {
|
||||
SUBDIRS += flightgear
|
||||
SUBDIRS += flightgearconfig
|
||||
}
|
||||
swiftConfig(sims.fs2020) {
|
||||
SUBDIRS += fs2020
|
||||
swiftConfig(sims.msfs) {
|
||||
SUBDIRS += msfs
|
||||
}
|
||||
load(common_post)
|
||||
|
||||
Reference in New Issue
Block a user