From 3ac6ad640aa6782baccb22076dd77f6839c3d660 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 2 May 2024 17:26:25 +0300 Subject: [PATCH] ENGINE_VERSION_INDEV replaced with ENGINE_DEBUG_BUILD --- src/constants.h | 8 +++++++- src/engine.cpp | 2 +- src/frontend/menu.cpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/constants.h b/src/constants.h index d89376b7..8909824d 100644 --- a/src/constants.h +++ b/src/constants.h @@ -7,7 +7,13 @@ inline constexpr int ENGINE_VERSION_MAJOR = 0; inline constexpr int ENGINE_VERSION_MINOR = 21; -inline constexpr bool ENGINE_VERSION_INDEV = true; + +#ifdef NDEBUG +inline constexpr bool ENGINE_DEBUG_BUILD = false; +#else +inline constexpr bool ENGINE_DEBUG_BUILD = true; +#endif // NDEBUG + inline const std::string ENGINE_VERSION_STRING = "0.21"; inline constexpr int BLOCK_AIR = 0; diff --git a/src/engine.cpp b/src/engine.cpp index c9dc803f..54bb6fce 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -78,7 +78,7 @@ Engine::Engine(EngineSettings& settings, SettingsHandler& settingsHandler, Engin paths->getResources() )); } - if (ENGINE_VERSION_INDEV) { + if (ENGINE_DEBUG_BUILD) { menus::create_version_label(this); } keepAlive(settings.ui.language.observe([=](auto lang) { diff --git a/src/frontend/menu.cpp b/src/frontend/menu.cpp index 2263bc23..4e98b808 100644 --- a/src/frontend/menu.cpp +++ b/src/frontend/menu.cpp @@ -23,7 +23,7 @@ using namespace gui; void menus::create_version_label(Engine* engine) { auto gui = engine->getGUI(); - auto text = ENGINE_VERSION_STRING+" development build"; + auto text = ENGINE_VERSION_STRING+" debug build"; gui->add(guiutil::create( "