refactor: Remove separate function to check for sim support

This commit is contained in:
Lars Toenning
2024-12-29 14:29:30 +01:00
parent efc7796f1b
commit db72e55281
3 changed files with 1 additions and 12 deletions

View File

@@ -42,9 +42,6 @@ namespace swift::config
//! with XPlane support? //! with XPlane support?
static constexpr bool isCompiledWithXPlaneSupport(); // defined in buildconfig_gen.inc.in static constexpr bool isCompiledWithXPlaneSupport(); // defined in buildconfig_gen.inc.in
//! with any simulator libraries
static constexpr bool isCompiledWithFlightSimulatorSupport();
//! Debug build? //! Debug build?
static constexpr bool isDebugBuild(); static constexpr bool isDebugBuild();

View File

@@ -17,11 +17,6 @@ namespace swift::config
return CBuildConfig::isCompiledWithFs9Support() || CBuildConfig::isCompiledWithFsxSupport() || CBuildConfig::isCompiledWithP3DSupport() || isCompiledWithMSFSSupport() || isCompiledWithMSFS2024Support(); return CBuildConfig::isCompiledWithFs9Support() || CBuildConfig::isCompiledWithFsxSupport() || CBuildConfig::isCompiledWithP3DSupport() || isCompiledWithMSFSSupport() || isCompiledWithMSFS2024Support();
} }
constexpr bool CBuildConfig::isCompiledWithFlightSimulatorSupport()
{
return CBuildConfig::isCompiledWithMsFlightSimulatorSupport() || CBuildConfig::isCompiledWithXPlaneSupport() || CBuildConfig::isCompiledWithFGSupport();
}
constexpr bool CBuildConfig::isRunningOnWindowsNtPlatform() constexpr bool CBuildConfig::isRunningOnWindowsNtPlatform()
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN

View File

@@ -49,10 +49,7 @@ namespace swift::core::context
} }
} }
bool IContextSimulator::isSimulatorAvailable() const bool IContextSimulator::isSimulatorAvailable() const { return !this->getSimulatorPluginInfo().isUnspecified(); }
{
return CBuildConfig::isCompiledWithFlightSimulatorSupport() && !this->getSimulatorPluginInfo().isUnspecified();
}
bool IContextSimulator::isSimulatorSimulating() const bool IContextSimulator::isSimulatorSimulating() const
{ {