From 81d2dbbac9f934c5e8eee17c99b358c3613ad808 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Tue, 10 Aug 2021 16:05:18 +0100 Subject: [PATCH] Issue #37 Disconnect when FPS drops below threshold --- src/blackcore/context/contextsimulatorimpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index a83c4ab89..a1bb5ac46 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -535,6 +535,8 @@ namespace BlackCore Q_ASSERT(c); // disconnect for X-Plane FPS below 20 + c = connect(simulator, &ISimulator::insufficientFrameRateDetected, this, [this](bool fatal) { if (fatal) { emit this->vitalityLost(); } }); + Q_ASSERT(c); c = connect(simulator, &ISimulator::insufficientFrameRateDetected, this, &IContextSimulator::insufficientFrameRateDetected); Q_ASSERT(c);