fix window title if VC_BUILD_NAME is empty

This commit is contained in:
MihailRis 2025-12-05 23:25:27 +03:00 committed by ShiftyX1
parent 213e9150dd
commit df1ce1ae53

View File

@ -36,13 +36,17 @@ WindowControl::Result WindowControl::initialize() {
if (!title.empty()) {
title += " - ";
}
title += "VoxelCore v" +
std::string buildName;
#ifdef VC_BUILD_NAME
std::string(VC_BUILD_NAME);
#else
std::to_string(ENGINE_VERSION_MAJOR) + "." +
std::to_string(ENGINE_VERSION_MINOR);
buildName = VC_BUILD_NAME;
#endif
title += "VoxelCore v";
if (buildName.empty()) {
title += std::to_string(ENGINE_VERSION_MAJOR) + "." +
std::to_string(ENGINE_VERSION_MINOR);
} else {
title += buildName;
}
if (ENGINE_DEBUG_BUILD) {
title += " [debug]";
}