From afd50517b7bfa9d243e67b484179e745d20aa182 Mon Sep 17 00:00:00 2001
From: Lukas <42946929+SkyView419@users.noreply.github.com>
Date: Tue, 15 Sep 2020 10:38:21 +0200
Subject: [PATCH] Ready for UE 4.25 // DisplayCluster is not necessary

---
 Source/UniversalLogging/Private/LogStream.cpp        | 4 ++--
 Source/UniversalLogging/Private/LogStream.h          | 2 +-
 Source/UniversalLogging/Private/OnScreenLog.h        | 4 ++--
 Source/UniversalLogging/Private/UniversalLogging.cpp | 7 ++++++-
 Source/UniversalLogging/Public/IUniversalLogging.h   | 3 ++-
 5 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/Source/UniversalLogging/Private/LogStream.cpp b/Source/UniversalLogging/Private/LogStream.cpp
index 94dd5de..23a1778 100644
--- a/Source/UniversalLogging/Private/LogStream.cpp
+++ b/Source/UniversalLogging/Private/LogStream.cpp
@@ -4,8 +4,8 @@
 #include "UniversalLogging.h"
 
 #include "HAL/PlatformFilemanager.h"
-#include "Paths.h"
-#include "IPlatformFileProfilerWrapper.h"
+#include "Misc/Paths.h"
+#include "HAL/IPlatformFileProfilerWrapper.h"
 
 LogStreamImpl::LogStreamImpl(const FString Filepath, const FString Filename, const bool bPer_Session, const bool bLogOnMaster, const bool bLogOnSlaves)
   : Filepath(Filepath)
diff --git a/Source/UniversalLogging/Private/LogStream.h b/Source/UniversalLogging/Private/LogStream.h
index f9ff323..7c250a2 100644
--- a/Source/UniversalLogging/Private/LogStream.h
+++ b/Source/UniversalLogging/Private/LogStream.h
@@ -1,5 +1,5 @@
 #pragma once
-#include "Color.h"
+#include "Math/Color.h"
 
 class LogStreamImpl : public ILogStream
 {
diff --git a/Source/UniversalLogging/Private/OnScreenLog.h b/Source/UniversalLogging/Private/OnScreenLog.h
index 0304628..77ce314 100644
--- a/Source/UniversalLogging/Private/OnScreenLog.h
+++ b/Source/UniversalLogging/Private/OnScreenLog.h
@@ -5,8 +5,8 @@
 #include "CoreMinimal.h"
 #include "Engine/Font.h"
 #include "GameFramework/Actor.h"
-#include "ConstructorHelpers.h"
-#include "Queue.h"
+#include "UObject/ConstructorHelpers.h"
+#include "Containers/Queue.h"
 #include "OnScreenLog.generated.h"
 
 UCLASS()
diff --git a/Source/UniversalLogging/Private/UniversalLogging.cpp b/Source/UniversalLogging/Private/UniversalLogging.cpp
index 543f3b7..5f2fbce 100644
--- a/Source/UniversalLogging/Private/UniversalLogging.cpp
+++ b/Source/UniversalLogging/Private/UniversalLogging.cpp
@@ -1,6 +1,7 @@
+#include "UniversalLogging.h"
+
 #include "UniversalLoggingPrivatePCH.h"
 
-#include "UniversalLogging.h"
 
 #include "LogStream.h"
 #include "GameFramework/PlayerController.h"
@@ -149,6 +150,10 @@ void UniversalLoggingImpl::ResetSessionId(FString Prefix)
 
 bool UniversalLoggingImpl::IsClusterMaster()
 {
+  if (!IDisplayCluster::IsAvailable()) 
+  {
+     return true;
+  }
   IDisplayClusterClusterManager* Manager = IDisplayCluster::Get().GetClusterMgr();
   if (Manager == nullptr)
   {
diff --git a/Source/UniversalLogging/Public/IUniversalLogging.h b/Source/UniversalLogging/Public/IUniversalLogging.h
index f65c4da..c6d052a 100644
--- a/Source/UniversalLogging/Public/IUniversalLogging.h
+++ b/Source/UniversalLogging/Public/IUniversalLogging.h
@@ -1,6 +1,7 @@
 #pragma once
 
-#include "ModuleManager.h"
+#include "IDisplayCluster.h"
+#include "Modules/ModuleManager.h"
 
 #include "ILogStream.h"
 
-- 
GitLab