Add linux equivalents for all the places that enumerate platforms (#3325)
* Add linux equivalents for all the places that enumerate platforms Signed-off-by: Chris Burel <burelc@amazon.com> * Fix the AssetFileInfoListComparisonTest fixture to not hardcode the PC platform Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
@@ -15,7 +15,7 @@ namespace AZ
|
||||
{
|
||||
inline namespace PlatformDefaults
|
||||
{
|
||||
static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformAndroid, PlatformIOS, PlatformMac, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient };
|
||||
static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformLinux, PlatformAndroid, PlatformIOS, PlatformMac, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient };
|
||||
|
||||
const char* PlatformIdToPalFolder(AZ::PlatformId platform)
|
||||
{
|
||||
@@ -27,6 +27,8 @@ namespace AZ
|
||||
{
|
||||
case AZ::PC:
|
||||
return "PC";
|
||||
case AZ::LINUX_ID:
|
||||
return "Linux";
|
||||
case AZ::ANDROID_ID:
|
||||
return "Android";
|
||||
case AZ::IOS:
|
||||
@@ -56,10 +58,14 @@ namespace AZ
|
||||
|
||||
const char* OSPlatformToDefaultAssetPlatform(AZStd::string_view osPlatform)
|
||||
{
|
||||
if (osPlatform == PlatformCodeNameWindows || osPlatform == PlatformCodeNameLinux)
|
||||
if (osPlatform == PlatformCodeNameWindows)
|
||||
{
|
||||
return PlatformPC;
|
||||
}
|
||||
if (osPlatform == PlatformCodeNameLinux)
|
||||
{
|
||||
return PlatformLinux;
|
||||
}
|
||||
else if (osPlatform == PlatformCodeNameMac)
|
||||
{
|
||||
return PlatformMac;
|
||||
@@ -201,6 +207,8 @@ namespace AZ
|
||||
{
|
||||
case PlatformId::PC:
|
||||
platformCodes.emplace_back(PlatformCodeNameWindows);
|
||||
break;
|
||||
case PlatformId::LINUX_ID:
|
||||
platformCodes.emplace_back(PlatformCodeNameLinux);
|
||||
break;
|
||||
case PlatformId::ANDROID_ID:
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace AZ
|
||||
inline namespace PlatformDefaults
|
||||
{
|
||||
constexpr char PlatformPC[] = "pc";
|
||||
constexpr char PlatformLinux[] = "linux";
|
||||
constexpr char PlatformAndroid[] = "android";
|
||||
constexpr char PlatformIOS[] = "ios";
|
||||
constexpr char PlatformMac[] = "mac";
|
||||
@@ -50,6 +51,7 @@ namespace AZ
|
||||
AZ_ENUM_WITH_UNDERLYING_TYPE(PlatformId, int,
|
||||
(Invalid, -1),
|
||||
PC,
|
||||
LINUX_ID,
|
||||
ANDROID_ID,
|
||||
IOS,
|
||||
MAC_ID,
|
||||
@@ -63,12 +65,13 @@ namespace AZ
|
||||
// Add new platforms above this
|
||||
NumPlatformIds
|
||||
);
|
||||
constexpr int NumClientPlatforms = 7;
|
||||
constexpr int NumClientPlatforms = 8;
|
||||
constexpr int NumPlatforms = NumClientPlatforms + 1; // 1 "Server" platform currently
|
||||
enum class PlatformFlags : AZ::u32
|
||||
{
|
||||
Platform_NONE = 0x00,
|
||||
Platform_PC = 1 << PlatformId::PC,
|
||||
Platform_LINUX = 1 << PlatformId::LINUX_ID,
|
||||
Platform_ANDROID = 1 << PlatformId::ANDROID_ID,
|
||||
Platform_IOS = 1 << PlatformId::IOS,
|
||||
Platform_MAC = 1 << PlatformId::MAC_ID,
|
||||
@@ -83,7 +86,7 @@ namespace AZ
|
||||
// A special platform that will always correspond to all non-server platforms, even if new ones are added
|
||||
Platform_ALL_CLIENT = 1ULL << 31,
|
||||
|
||||
AllNamedPlatforms = Platform_PC | Platform_ANDROID | Platform_IOS | Platform_MAC | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER,
|
||||
AllNamedPlatforms = Platform_PC | Platform_LINUX | Platform_ANDROID | Platform_IOS | Platform_MAC | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER,
|
||||
};
|
||||
|
||||
AZ_DEFINE_ENUM_BITWISE_OPERATORS(PlatformFlags);
|
||||
|
||||
Reference in New Issue
Block a user