diff options
| author | untodesu <kirill@untode.su> | 2025-05-27 16:39:43 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-05-27 16:39:43 +0500 |
| commit | dcc14bf180954f0c186ec545cc553e30ceed7799 (patch) | |
| tree | 104eb6a5a37b083e5e654844df348f92b312e1a3 /game/client/window_title.cc | |
| parent | adbbe24b0941c369d52461418cef206fc895168e (diff) | |
| download | voxelius-dcc14bf180954f0c186ec545cc553e30ceed7799.tar.bz2 voxelius-dcc14bf180954f0c186ec545cc553e30ceed7799.zip | |
Add a special title postfix when sound is disabled
Diffstat (limited to 'game/client/window_title.cc')
| -rw-r--r-- | game/client/window_title.cc | 8 |
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()); } |
