Minor changes from porting
This commit is contained in:
@@ -163,7 +163,7 @@ bool ContentLoadingManagerService::Init()
|
||||
|
||||
// Calculate amount of loading threads to use
|
||||
const CPUInfo cpuInfo = Platform::GetCPUInfo();
|
||||
const int32 count = Math::Clamp(static_cast<int32>(LOADING_THREAD_PER_LOGICAL_CORE * (float)cpuInfo.LogicalProcessorCount), 1, 12);
|
||||
const int32 count = Math::Clamp(Math::CeilToInt(LOADING_THREAD_PER_LOGICAL_CORE * (float)cpuInfo.LogicalProcessorCount), 1, 12);
|
||||
LOG(Info, "Creating {0} content loading threads...", count);
|
||||
|
||||
// Create loading threads
|
||||
|
||||
@@ -1891,6 +1891,13 @@ void OnLogCallback(const char* logDomain, const char* logLevel, const char* mess
|
||||
{
|
||||
LOG(Info, "Message: {0} | Domain: {1}", msg, currentDomain);
|
||||
}
|
||||
#if DOTNET_HOST_MONO && !BUILD_RELEASE
|
||||
if (errorLevel <= 2)
|
||||
{
|
||||
// Mono backend ends with fatal assertions so capture crash info (eg. stack trace)
|
||||
CRASH;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnPrintCallback(const char* string, mono_bool isStdout)
|
||||
|
||||
@@ -633,6 +633,7 @@ namespace Flax.Build.Platforms
|
||||
var pchSourceFile = Path.Combine(options.IntermediateFolder, Path.ChangeExtension(pchFilName, "cpp"));
|
||||
var contents = Bindings.BindingsGenerator.GetStringBuilder();
|
||||
contents.AppendLine("// This code was auto-generated. Do not modify it.");
|
||||
// TODO: write compiler version to properly rebuild pch on Visual Studio updates
|
||||
contents.Append("// Compiler: ").AppendLine(_compilerPath);
|
||||
contents.Append("#include \"").Append(pchSource).AppendLine("\"");
|
||||
Utilities.WriteFileIfChanged(pchSourceFile, contents.ToString());
|
||||
|
||||
Reference in New Issue
Block a user