summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-05-27 16:39:43 +0500
committeruntodesu <kirill@untode.su>2025-05-27 16:39:43 +0500
commitdcc14bf180954f0c186ec545cc553e30ceed7799 (patch)
tree104eb6a5a37b083e5e654844df348f92b312e1a3
parentadbbe24b0941c369d52461418cef206fc895168e (diff)
downloadvoxelius-dcc14bf180954f0c186ec545cc553e30ceed7799.tar.bz2
voxelius-dcc14bf180954f0c186ec545cc553e30ceed7799.zip
Add a special title postfix when sound is disabled
-rw-r--r--game/client/window_title.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/game/client/window_title.cc b/game/client/window_title.cc
index 7e4da10..fc113c2 100644
--- a/game/client/window_title.cc
+++ b/game/client/window_title.cc
@@ -10,7 +10,11 @@
void window_title::update(void)
{
- auto string = fmt::format("Voxelius {}: {}", PROJECT_VERSION_STRING, splash::get());
+ std::string title;
- glfwSetWindowTitle(globals::window, string.c_str());
+ if(globals::sound_ctx && globals::sound_dev)
+ title = fmt::format("Voxelius {}: {}", PROJECT_VERSION_STRING, splash::get());
+ else title = fmt::format("Voxelius {}: {} [NOSOUND]", PROJECT_VERSION_STRING, splash::get());
+
+ glfwSetWindowTitle(globals::window, title.c_str());
}