From 0fb96206c54203c4cd1a95803d79a690f49a4b36 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Fri, 17 Mar 2017 19:05:07 +0100 Subject: [PATCH] refs #916, interpolator mode for FSX --- .../simulator/fsxcommon/simulatorfsxcommon.cpp | 15 +++++++++++++++ .../simulator/fsxcommon/simulatorfsxcommon.h | 1 + 2 files changed, 16 insertions(+) diff --git a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp index 3fbf774a9..73c627481 100644 --- a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp +++ b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp @@ -297,6 +297,21 @@ namespace BlackSimPlugin return CCallsignSet(this->m_simConnectObjects.keys()); } + bool CSimulatorFsxCommon::setInterpolatorMode(CInterpolatorMulti::Mode mode, const CCallsign &callsign) + { + if (mode == CInterpolatorMulti::ModeUnkown) { return false; } + if (callsign.isEmpty()) + { + const int c = m_simConnectObjects.setInterpolatorModes(mode); + return c > 0; + } + else + { + if (!m_simConnectObjects.contains(callsign)) { return false; } + return m_simConnectObjects[callsign].setInterpolatorMode(mode); + } + } + bool CSimulatorFsxCommon::stillDisplayReceiveExceptions() { m_receiveExceptionCount++; diff --git a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h index c9168b9f2..0c6500db0 100644 --- a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h +++ b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h @@ -118,6 +118,7 @@ namespace BlackSimPlugin virtual void displayTextMessage(const BlackMisc::Network::CTextMessage &message) const override; virtual bool isPhysicallyRenderedAircraft(const BlackMisc::Aviation::CCallsign &callsign) const override; virtual BlackMisc::Aviation::CCallsignSet physicallyRenderedAircraft() const override; + virtual bool setInterpolatorMode(BlackMisc::Simulation::CInterpolatorMulti::Mode mode, const BlackMisc::Aviation::CCallsign &callsign) override; //! @} protected: