mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Avoid ASSERT from emulated driver
* not all plugins are installed * use default simulator if there is no simulator info
This commit is contained in:
committed by
Mat Sutcliffe
parent
0d2bf4865a
commit
a646e122af
@@ -447,7 +447,20 @@ namespace BlackCore
|
||||
this->setRemoteAircraftProvider(renderedAircraftProvider);
|
||||
|
||||
// use simulator info from ISimulator as it can access the emulated driver settings
|
||||
const CSimulatorInfo simInfo = simulator->getSimulatorInfo();
|
||||
CSimulatorInfo simInfo = simulator->getSimulatorInfo();
|
||||
if (!simInfo.isSingleSimulator())
|
||||
{
|
||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, "Invalid simulator from plugin");
|
||||
simInfo = CSimulatorInfo::p3d();
|
||||
if (simulator->isEmulatedDriver())
|
||||
{
|
||||
CLogMessage(this).error(u"Emulated driver does NOT provide valid simulator, using default '%1', plugin: '%2'") << simInfo.toQString(true) << simulatorPluginInfo.toQString(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).error(u"Invalid driver using default '%1', plugin: '%2'") << simInfo.toQString(true) << simulatorPluginInfo.toQString(true);
|
||||
}
|
||||
}
|
||||
Q_ASSERT_X(simInfo.isSingleSimulator(), Q_FUNC_INFO, "need single simulator");
|
||||
|
||||
m_modelSetSimulator.set(simInfo);
|
||||
|
||||
Reference in New Issue
Block a user