Skip to content
Snippets Groups Projects
Commit 41f0123c authored by Simon Oehrl's avatar Simon Oehrl
Browse files

Merge branch 'feature/ExcludeNDisplayOnNonWindowsOrLinux' into 'develop'

Make nDisplay only a dependency under Windows or Linux

See merge request VR-Group/unreal-development/universallogging!10
parents 24af4375 3b6c380d
No related branches found
No related tags found
2 merge requests!16Develop,!10Make nDisplay only a dependency under Windows or Linux
......@@ -3,8 +3,10 @@
#include "LogStream.h"
#include "GameFramework/PlayerController.h"
#include "GameFramework/HUD.h"
#if PLATFORM_WINDOWS || PLATFORM_LINUX
#include "IDisplayCluster.h"
#include "Cluster/IDisplayClusterClusterManager.h"
#endif
#include "Misc/CommandLine.h"
LogFileManager UniversalLoggingImpl::Log_File_Manager{};
......@@ -156,6 +158,7 @@ void UniversalLoggingImpl::ResetSessionId(FString Prefix)
bool UniversalLoggingImpl::IsClusterMaster()
{
#if PLATFORM_WINDOWS || PLATFORM_LINUX
if (!IDisplayCluster::IsAvailable())
{
return true;
......@@ -166,14 +169,21 @@ bool UniversalLoggingImpl::IsClusterMaster()
return true; // if we are not in cluster mode, we are always the master
}
return Manager->IsMaster() || !Manager->IsSlave();
#else
return true;
#endif
}
FString UniversalLoggingImpl::GetNodeName()
{
#if PLATFORM_WINDOWS || PLATFORM_LINUX
if (IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster)
return IDisplayCluster::Get().GetClusterMgr()->GetNodeId();
else
return FString(TEXT("Localhost"));
#else
return FString(TEXT("Localhost"));
#endif
}
LogFileManager* UniversalLoggingImpl::GetLogFileManager()
......
#pragma once
#if PLATFORM_WINDOWS || PLATFORM_LINUX
#include "IDisplayCluster.h"
#endif
#include "Modules/ModuleManager.h"
#include "ILogStream.h"
......
......@@ -12,6 +12,11 @@ public class UniversalLogging : ModuleRules
PrivateIncludePaths.AddRange(new string[] { });
PublicIncludePaths.AddRange(new string[] { });
PublicDependencyModuleNames.AddRange(new string[] { "CoreUObject", "Engine", "Core", "DisplayCluster" });
PublicDependencyModuleNames.AddRange(new string[] { "CoreUObject", "Engine", "Core" });
if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.Win64)
{
PublicDependencyModuleNames.AddRange(new string[] { "DisplayCluster" });
}
}
}
\ No newline at end of file
......@@ -20,7 +20,11 @@
"Plugins": [
{
"Name": "nDisplay",
"Enabled": true
"Enabled": true,
"WhitelistPlatforms": [
"Win64",
"Linux"
]
}
]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment