From dcc14bf180954f0c186ec545cc553e30ceed7799 Mon Sep 17 00:00:00 2001 From: untodesu Date: Tue, 27 May 2025 16:39:43 +0500 Subject: Add a special title postfix when sound is disabled --- game/client/window_title.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'game/client') 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()); } -- cgit