* Added zones to some special computer names. Will be removed once environment variables are set

[CL 35791353 by henrik karlsson in ue5-main branch]
This commit is contained in:
henrik karlsson
2024-08-25 01:23:53 -04:00
parent 5e83ef9de4
commit 184b5a4af7
4 changed files with 28 additions and 6 deletions
@@ -2875,4 +2875,27 @@ namespace uba
if (counterSuffix)
out.Appendf(TC("_%03u"), counterSuffix);
}
bool GetZone(StringBufferBase& outZone)
{
outZone.count = GetEnvironmentVariableW(TC("UBA_ZONE"), outZone.data, outZone.capacity);
if (outZone.count)
return true;
// TODO: Remove.
#if PLATFORM_MAC
if (!GetComputerName(outZone.data, outZone.capacity))
return false;
outZone.count = TStrlen(outZone.data);
if (outZone.StartsWith(TC("dc4-mac")) || outZone.StartsWith(TC("rdu-mac")))
{
outZone.Resize(7);
return true;
}
outZone.count = 0;
#endif
return false;
}
}