Add PS5 platform defines and types

This commit is contained in:
Wojtek Figat
2021-10-08 16:24:59 +02:00
parent aef024f572
commit 48a867ef16
56 changed files with 216 additions and 46 deletions

View File

@@ -587,6 +587,8 @@ const Char* ToString(PlatformType type)
return TEXT("Android");
case PlatformType::Switch:
return TEXT("Switch");
case PlatformType::PS5:
return TEXT("PlayStation 5");
default:
return TEXT("");
}

View File

@@ -4,22 +4,10 @@
#if PLATFORM_WINDOWS
#include "Windows/WindowsClipboard.h"
#elif PLATFORM_UWP
#include "Base/ClipboardBase.h"
#elif PLATFORM_LINUX
#include "Linux/LinuxClipboard.h"
#elif PLATFORM_PS4
#include "Base/ClipboardBase.h"
#elif PLATFORM_XBOX_ONE
#include "Base/ClipboardBase.h"
#elif PLATFORM_XBOX_SCARLETT
#include "Base/ClipboardBase.h"
#elif PLATFORM_ANDROID
#include "Base/ClipboardBase.h"
#elif PLATFORM_SWITCH
#include "Base/ClipboardBase.h"
#else
#error Missing Clipboard implementation!
#include "Base/ClipboardBase.h"
#endif
#include "Types.h"

View File

@@ -10,6 +10,8 @@
#include "Unix/UnixCriticalSection.h"
#elif PLATFORM_PS4
#include "Unix/UnixCriticalSection.h"
#elif PLATFORM_PS5
#include "Unix/UnixCriticalSection.h"
#elif PLATFORM_XBOX_ONE
#include "Win32/Win32CriticalSection.h"
#elif PLATFORM_XBOX_SCARLETT

View File

@@ -48,6 +48,11 @@ API_ENUM() enum class PlatformType
/// Running on Switch.
/// </summary>
Switch = 8,
/// <summary>
/// Running on PlayStation 5.
/// </summary>
PS5 = 9,
};
/// <summary>
@@ -103,6 +108,9 @@ API_ENUM() enum class ArchitectureType
#if !defined(PLATFORM_PS4)
#define PLATFORM_PS4 0
#endif
#if !defined(PLATFORM_PS5)
#define PLATFORM_PS5 0
#endif
#if !defined(PLATFORM_XBOX_SCARLETT)
#define PLATFORM_XBOX_SCARLETT 0
#endif
@@ -130,6 +138,8 @@ API_ENUM() enum class ArchitectureType
#include "Linux/LinuxDefines.h"
#elif PLATFORM_PS4
#include "Platforms/PS4/Engine/Platform/PS4Defines.h"
#elif PLATFORM_PS5
#include "Platforms/PS5/Engine/Platform/PS5Defines.h"
#elif PLATFORM_XBOX_ONE
#include "Platforms/XboxOne/Engine/Platform/XboxOneDefines.h"
#elif PLATFORM_XBOX_SCARLETT
@@ -178,7 +188,7 @@ API_ENUM() enum class ArchitectureType
// Platform family defines
#define PLATFORM_WINDOWS_FAMILY (PLATFORM_WINDOWS || PLATFORM_UWP || PLATFORM_XBOX_ONE || PLATFORM_XBOX_SCARLETT)
#define PLATFORM_MICROSOFT_FAMILY (PLATFORM_WINDOWS_FAMILY)
#define PLATFORM_UNIX_FAMILY (PLATFORM_LINUX || PLATFORM_ANDROID || PLATFORM_PS4)
#define PLATFORM_UNIX_FAMILY (PLATFORM_LINUX || PLATFORM_ANDROID || PLATFORM_PS4 || PLATFORM_PS5)
#define PLATFORM_APPLE_FAMILY (PLATFORM_IOS || PLATFORM_OSX)
// SIMD defines

View File

@@ -10,6 +10,8 @@
#include "Unix/UnixFile.h"
#elif PLATFORM_PS4
#include "Unix/UnixFile.h"
#elif PLATFORM_PS5
#include "Unix/UnixFile.h"
#elif PLATFORM_XBOX_ONE
#include "Win32/Win32File.h"
#elif PLATFORM_XBOX_SCARLETT

View File

@@ -10,6 +10,8 @@
#include "Linux/LinuxFileSystem.h"
#elif PLATFORM_PS4
#include "Platforms/PS4/Engine/Platform/PS4FileSystem.h"
#elif PLATFORM_PS5
#include "Platforms/PS5/Engine/Platform/PS5FileSystem.h"
#elif PLATFORM_XBOX_ONE
#include "Platforms/XboxOne/Engine/Platform/XboxOneFileSystem.h"
#elif PLATFORM_XBOX_SCARLETT

View File

@@ -4,20 +4,10 @@
#if PLATFORM_WINDOWS
#include "Windows/WindowsFileSystemWatcher.h"
#elif PLATFORM_UWP
#include "Base/FileSystemWatcherBase.h"
#elif PLATFORM_LINUX
#include "Linux/LinuxFileSystemWatcher.h"
#elif PLATFORM_PS4
#include "Base/FileSystemWatcherBase.h"
#elif PLATFORM_XBOX_SCARLETT
#include "Base/FileSystemWatcherBase.h"
#elif PLATFORM_ANDROID
#include "Base/FileSystemWatcherBase.h"
#elif PLATFORM_SWITCH
#include "Base/FileSystemWatcherBase.h"
#else
#error Missing File System Watcher implementation!
#include "Base/FileSystemWatcherBase.h"
#endif
#include "Types.h"

View File

@@ -10,6 +10,8 @@
#include "Unix/UnixNetwork.h"
#elif PLATFORM_PS4
#include "Platforms/PS4/Engine/Platform/PS4Network.h"
#elif PLATFORM_PS5
#include "Platforms/PS5/Engine/Platform/PS5Network.h"
#elif PLATFORM_XBOX_ONE
#include "Win32/Win32Network.h"
#elif PLATFORM_XBOX_SCARLETT

View File

@@ -56,6 +56,10 @@ public class Platform : EngineModule
options.SourcePaths.Add(Path.Combine(FolderPath, "Unix"));
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Platform"));
break;
case TargetPlatform.PS5:
options.SourcePaths.Add(Path.Combine(FolderPath, "Unix"));
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS5", "Engine", "Platform"));
break;
case TargetPlatform.XboxOne:
options.SourcePaths.Add(Path.Combine(FolderPath, "Win32"));
options.SourcePaths.Add(Path.Combine(FolderPath, "GDK"));
@@ -86,6 +90,7 @@ public class Platform : EngineModule
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Platform", "XboxOnePlatformSettings.h"));
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxScarlett", "Engine", "Platform", "XboxScarlettPlatformSettings.h"));
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Platform", "PS4PlatformSettings.h"));
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS5", "Engine", "Platform", "PS5PlatformSettings.h"));
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "Switch", "Engine", "Platform", "SwitchPlatformSettings.h"));
}
}

View File

@@ -16,6 +16,8 @@
#include "Linux/LinuxPlatform.h"
#elif PLATFORM_PS4
#include "Platforms/PS4/Engine/Platform/PS4Platform.h"
#elif PLATFORM_PS5
#include "Platforms/PS5/Engine/Platform/PS5Platform.h"
#elif PLATFORM_XBOX_ONE
#include "Platforms/XboxOne/Engine/Platform/XboxOnePlatform.h"
#elif PLATFORM_XBOX_SCARLETT

View File

@@ -10,6 +10,8 @@
#include "Linux/LinuxThread.h"
#elif PLATFORM_PS4
#include "Platforms/PS4/Engine/Platform/PS4Thread.h"
#elif PLATFORM_PS5
#include "Platforms/PS5/Engine/Platform/PS5Thread.h"
#elif PLATFORM_XBOX_ONE
#include "Win32/Win32Thread.h"
#elif PLATFORM_XBOX_SCARLETT

View File

@@ -93,6 +93,30 @@ class PS4Window;
typedef PS4Window Window;
class PS4Network;
typedef PS4Network Network;
#elif PLATFORM_PS5
class ClipboardBase;
typedef ClipboardBase Clipboard;
class UnixCriticalSection;
typedef UnixCriticalSection CriticalSection;
class UnixConditionVariable;
typedef UnixConditionVariable ConditionVariable;
class PS5FileSystem;
typedef PS5FileSystem FileSystem;
class FileSystemWatcherBase;
typedef FileSystemWatcherBase FileSystemWatcher;
class UnixFile;
typedef UnixFile File;
class PS5Platform;
typedef PS5Platform Platform;
class PS5Thread;
typedef PS5Thread Thread;
class PS5Window;
typedef PS5Window Window;
class PS5Network;
typedef PS5Network Network;
#elif PLATFORM_XBOX_ONE
class ClipboardBase;

View File

@@ -1,6 +1,6 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#if PLATFORM_UNIX && !PLATFORM_PS4
#if PLATFORM_UNIX && !PLATFORM_PS4 && !PLATFORM_PS5
#include "UnixNetwork.h"
#include "Engine/Core/Log.h"