From 706b9497cee29e6abff72d19dffd9842a1f42a38 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sun, 24 Jul 2016 21:18:25 +0200 Subject: [PATCH] No fps display in window title if text overlay is enabled --- base/vulkanexamplebase.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index 2fd7808c..674bb705 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -54,7 +54,11 @@ std::string VulkanExampleBase::getWindowTitle() { std::string device(deviceProperties.deviceName); std::string windowTitle; - windowTitle = title + " - " + device + " - " + std::to_string(frameCounter) + " fps"; + windowTitle = title + " - " + device; + if (!enableTextOverlay) + { + windowTitle += " - " + std::to_string(frameCounter) + " fps"; + } return windowTitle; } @@ -406,9 +410,9 @@ void VulkanExampleBase::renderLoop() fpsTimer += (float)tDiff; if (fpsTimer > 1000.0f) { - std::string windowTitle = getWindowTitle(); if (!enableTextOverlay) { + std::string windowTitle = getWindowTitle(); SetWindowText(window, windowTitle.c_str()); } lastFPS = frameCounter;