mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Exclude emulated driver from FSX settings as this will cause issues
The emulated driver looks like P3D/FSD, but is a different class
This commit is contained in:
@@ -134,11 +134,16 @@ namespace BlackSimPlugin
|
||||
|
||||
CSimulatorFsxCommon *CFsxSettingsComponent::getFsxOrP3DSimulator() const
|
||||
{
|
||||
if (!sGui || !sGui->getISimulator() || sGui->isShuttingDown()) { return nullptr; }
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->getIContextSimulator() || !sGui->getISimulator()) { return nullptr; }
|
||||
const CSimulatorPluginInfo plugin = sGui->getIContextSimulator()->getSimulatorPluginInfo();
|
||||
if (plugin.isEmulatedPlugin()) { return nullptr; } // cast would fail
|
||||
|
||||
ISimulator *simulator = sGui->getISimulator();
|
||||
if (!simulator->getSimulatorInfo().isFsxP3DFamily()) { return nullptr; }
|
||||
if (simulator->getSimulatorInfo() != m_simulator) { return nullptr; }
|
||||
CSimulatorFsxCommon *fsx = static_cast<CSimulatorFsxCommon *>(simulator); // wonder why qobject_cast does not work here
|
||||
if (simulator->getSimulatorInfo() != m_simulator) { return nullptr; }
|
||||
|
||||
//! \todo KB 11/18 wonder why qobject_cast does not work here
|
||||
CSimulatorFsxCommon *fsx = static_cast<CSimulatorFsxCommon *>(simulator);
|
||||
return fsx;
|
||||
}
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user