mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Remove ISimulator::getSimulatorInfo()
To provide maximum flexibility, the simulator info is specified by each plugin in the JSON metadata file. * Renamed SCimulatorInfo to CSimulatorPluginInfo * Removed pre-defined simulator infos (UnspecifiedSim, FSX, etc) * CContextSimulator keeps track of which plugin is loaded and its info * QSignalMapper keeps track of which listener emitted the simulatorStared() signal * CSimulatorPluginInfo contains name, simulator name and description * TODO: GUI part * TODO: CTestFsCommon
This commit is contained in:
committed by
Roland Winklmeier
parent
3897fb2d1a
commit
63e48ae332
@@ -256,13 +256,16 @@ namespace BlackCore
|
||||
return escaped;
|
||||
}
|
||||
|
||||
VatSimType CNetworkVatlib::convertToSimType(CSimulatorInfo &simInfo)
|
||||
VatSimType CNetworkVatlib::convertToSimType(CSimulatorPluginInfo &simInfo)
|
||||
{
|
||||
if (simInfo.isUnspecified()) { return vatSimTypeUnknown; }
|
||||
if (CSimulatorInfo::FS9().isSameSimulator(simInfo)) { return vatSimTypeMSCFS; }
|
||||
if (CSimulatorInfo::FSX().isSameSimulator(simInfo)) { return vatSimTypeMSCFS; }
|
||||
if (CSimulatorInfo::XP().isSameSimulator(simInfo)) { return vatSimTypeXPLANE; }
|
||||
return vatSimTypeUnknown;
|
||||
/* TODO Define recognized simulators somewhere */
|
||||
if (simInfo.simulator() == "fs9" || simInfo.simulator() == "fsx") {
|
||||
return vatSimTypeMSCFS;
|
||||
} else if (simInfo.simulator() == "xplane") {
|
||||
return vatSimTypeXPLANE;
|
||||
} else {
|
||||
return vatSimTypeUnknown;
|
||||
}
|
||||
}
|
||||
|
||||
/********************************** * * * * * * * * * * * * * * * * * * * ************************************/
|
||||
@@ -275,7 +278,7 @@ namespace BlackCore
|
||||
m_server = server;
|
||||
}
|
||||
|
||||
void CNetworkVatlib::presetSimulatorInfo(const CSimulatorInfo &simInfo)
|
||||
void CNetworkVatlib::presetSimulatorInfo(const CSimulatorPluginInfo &simInfo)
|
||||
{
|
||||
Q_ASSERT_X(isDisconnected(), "CNetworkVatlib", "Can't change server details while still connected");
|
||||
m_simulatorInfo = simInfo;
|
||||
|
||||
Reference in New Issue
Block a user