Skip to content

Commit 728e364

Browse files
committed
fix window title if VC_BUILD_NAME is empty
1 parent d8d9e98 commit 728e364

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/engine/WindowControl.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,17 @@ WindowControl::Result WindowControl::initialize() {
3636
if (!title.empty()) {
3737
title += " - ";
3838
}
39-
title += "VoxelCore v" +
39+
std::string buildName;
4040
#ifdef VC_BUILD_NAME
41-
std::string(VC_BUILD_NAME);
42-
#else
43-
std::to_string(ENGINE_VERSION_MAJOR) + "." +
44-
std::to_string(ENGINE_VERSION_MINOR);
41+
buildName = VC_BUILD_NAME;
4542
#endif
43+
title += "VoxelCore v";
44+
if (buildName.empty()) {
45+
title += std::to_string(ENGINE_VERSION_MAJOR) + "." +
46+
std::to_string(ENGINE_VERSION_MINOR);
47+
} else {
48+
title += buildName;
49+
}
4650
if (ENGINE_DEBUG_BUILD) {
4751
title += " [debug]";
4852
}

0 commit comments

Comments
 (0)