From 209515225181bfcbf744509ceab56125c1394064 Mon Sep 17 00:00:00 2001 From: OusmBlueNinja <89956790+OusmBlueNinja@users.noreply.github.com> Date: Sat, 4 Jan 2025 22:39:32 -0600 Subject: [PATCH] Added (DEBUG) In Window title and Perf. Stats --- src/Windows/PerformanceWindow.cpp | 5 +++++ src/main.cpp | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Windows/PerformanceWindow.cpp b/src/Windows/PerformanceWindow.cpp index 0a434ac..083e6ff 100644 --- a/src/Windows/PerformanceWindow.cpp +++ b/src/Windows/PerformanceWindow.cpp @@ -112,7 +112,12 @@ void PerformanceWindow::Show(float fps, float ms) ImGui::Begin("Performance##performance"); // A color-coded main header + #ifdef DEBUG + ImGui::TextColored(ImVec4(1.0f, 0.8f, 0.2f, 1.0f), "Performance Stats (DEBUG)"); + #else ImGui::TextColored(ImVec4(1.0f, 0.8f, 0.2f, 1.0f), "Performance Stats"); + #endif + ImGui::Separator(); ImGui::Spacing(); diff --git a/src/main.cpp b/src/main.cpp index 2a3fcf9..e1a4333 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,9 +12,14 @@ int main() // Small error where the constuctor would crash MyEngine engine; DEBUG_PRINT("[OK] Creating Global Engine "); + + #ifdef DEBUG + std::string title = "Tesseract Engine (DEBUG)"; + #else + std::string title = "Tesseract Engine"; + #endif - - if (!engine.Init(1280, 720, "Tesseract Engine")) + if (!engine.Init(1280, 720, title)) { fprintf(stderr, "Failed to initialize engine.\n"); return 1;