From 07a2101158b7e69b0e7dcdca4744b64d39d1f773 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 1 Jan 2022 18:17:44 +0000 Subject: [PATCH] Fix headless build --- src/override/RemoteWindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/override/RemoteWindow.cpp b/src/override/RemoteWindow.cpp index aa1a914..4c0eff5 100644 --- a/src/override/RemoteWindow.cpp +++ b/src/override/RemoteWindow.cpp @@ -140,6 +140,7 @@ struct Window::Internal std::map> imageCache; bool fbDirtyOnSubpixelChange = true; + int fbCount = 0; #ifdef WITH_MESA void run() override { @@ -359,6 +360,7 @@ void Window::step() { double lastFrameTime = internal->frameTime; internal->frameTime = frameTime; internal->lastFrameDuration = frameTime - lastFrameTime; + internal->fbCount = 0; // DEBUG("%.2lf Hz", 1.0 / internal->lastFrameDuration); // Make event handlers and step() have a clean NanoVG context @@ -507,6 +509,11 @@ bool& Window::fbDirtyOnSubpixelChange() { } +int& Window::fbCount() { + return internal->fbCount; +} + + } // namespace window } // namespace rack