Skip to content
Snippets Groups Projects

Make nDisplay only a dependency under Windows or Linux

Merged Jan Delember requested to merge feature/ExcludeNDisplayOnNonWindowsOrLinux into develop
4 files
+ 24
2
Compare changes
  • Side-by-side
  • Inline

Files

@@ -3,8 +3,10 @@
@@ -3,8 +3,10 @@
#include "LogStream.h"
#include "LogStream.h"
#include "GameFramework/PlayerController.h"
#include "GameFramework/PlayerController.h"
#include "GameFramework/HUD.h"
#include "GameFramework/HUD.h"
 
#if PLATFORM_WINDOWS || PLATFORM_LINUX
#include "IDisplayCluster.h"
#include "IDisplayCluster.h"
#include "Cluster/IDisplayClusterClusterManager.h"
#include "Cluster/IDisplayClusterClusterManager.h"
 
#endif
#include "Misc/CommandLine.h"
#include "Misc/CommandLine.h"
void UniversalLoggingImpl::StartupModule()
void UniversalLoggingImpl::StartupModule()
@@ -154,6 +156,7 @@ void UniversalLoggingImpl::ResetSessionId(FString Prefix)
@@ -154,6 +156,7 @@ void UniversalLoggingImpl::ResetSessionId(FString Prefix)
bool UniversalLoggingImpl::IsClusterMaster()
bool UniversalLoggingImpl::IsClusterMaster()
{
{
 
#if PLATFORM_WINDOWS || PLATFORM_LINUX
if (!IDisplayCluster::IsAvailable())
if (!IDisplayCluster::IsAvailable())
{
{
return true;
return true;
@@ -164,14 +167,21 @@ bool UniversalLoggingImpl::IsClusterMaster()
@@ -164,14 +167,21 @@ bool UniversalLoggingImpl::IsClusterMaster()
return true; // if we are not in cluster mode, we are always the master
return true; // if we are not in cluster mode, we are always the master
}
}
return Manager->IsMaster() || !Manager->IsSlave();
return Manager->IsMaster() || !Manager->IsSlave();
 
#else
 
return true;
 
#endif
}
}
FString UniversalLoggingImpl::GetNodeName()
FString UniversalLoggingImpl::GetNodeName()
{
{
 
#if PLATFORM_WINDOWS || PLATFORM_LINUX
if (IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster)
if (IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster)
return IDisplayCluster::Get().GetClusterMgr()->GetNodeId();
return IDisplayCluster::Get().GetClusterMgr()->GetNodeId();
else
else
return FString(TEXT("Localhost"));
return FString(TEXT("Localhost"));
 
#else
 
return FString(TEXT("Localhost"));
 
#endif
}
}
IMPLEMENT_MODULE(UniversalLoggingImpl, UniversalLogging)
IMPLEMENT_MODULE(UniversalLoggingImpl, UniversalLogging)
Loading