mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
Ref T361, better guards for plugin and sGui
No need to create an assert if plugin is not avilable, though the plugin info should be "Unspecified" in that case
This commit is contained in:
@@ -61,6 +61,11 @@ namespace BlackCore
|
||||
return static_cast<ISimulator::SimulatorStatus>(this->getSimulatorStatus());
|
||||
}
|
||||
|
||||
bool IContextSimulator::isSimulatorAvailable() const
|
||||
{
|
||||
return BlackConfig::CBuildConfig::isCompiledWithFlightSimulatorSupport() && !getSimulatorPluginInfo().isUnspecified();
|
||||
}
|
||||
|
||||
bool IContextSimulator::isSimulatorSimulating() const
|
||||
{
|
||||
if (!isSimulatorAvailable() || !getSimulatorStatusEnum().testFlag(ISimulator::Simulating)) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user