mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 02:16:04 +08:00
Ref T732, improved simulator type resolution for network
This commit is contained in:
committed by
Mat Sutcliffe
parent
1ffedcb252
commit
9a4fe0ea48
@@ -173,25 +173,15 @@ namespace BlackCore
|
|||||||
void CFSDClient::setSimType(const CSimulatorPluginInfo &simInfo)
|
void CFSDClient::setSimType(const CSimulatorPluginInfo &simInfo)
|
||||||
{
|
{
|
||||||
//! \fixme Define recognized simulators somewhere */
|
//! \fixme Define recognized simulators somewhere */
|
||||||
if (simInfo.getSimulator() == "fs9")
|
const CSimulatorInfo::Simulator sim = simInfo.getSimulatorInfo().getSimulator();
|
||||||
|
switch (sim)
|
||||||
{
|
{
|
||||||
m_simType = SimType::MSFS2004;
|
case CSimulatorInfo::FSX: m_simType = SimType::MSFSX; break;
|
||||||
}
|
case CSimulatorInfo::P3D: m_simType = SimType::P3Dv4; break;
|
||||||
else if (simInfo.getSimulator() == "fsx")
|
case CSimulatorInfo::FS9: m_simType = SimType::MSFS2004; break;
|
||||||
{
|
case CSimulatorInfo::FG: m_simType = SimType::FlightGear; break;
|
||||||
m_simType = SimType::MSFSX;
|
case CSimulatorInfo::XPLANE: m_simType = SimType::XPLANE11; break;
|
||||||
}
|
default: m_simType = SimType::Unknown; break;
|
||||||
else if (simInfo.getSimulator() == "p3d")
|
|
||||||
{
|
|
||||||
m_simType = SimType::P3Dv4;
|
|
||||||
}
|
|
||||||
else if (simInfo.getSimulator() == "xplane")
|
|
||||||
{
|
|
||||||
m_simType = SimType::XPLANE11;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_simType = SimType::Unknown;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user