Add **Web platform with Emscripten**

This commit is contained in:
Wojtek Figat
2026-02-14 00:07:21 +01:00
parent fd0584b406
commit f12ad5c874
80 changed files with 1529 additions and 61 deletions

View File

@@ -44,7 +44,7 @@ static_assert(sizeof(double) == 8, "Invalid double type size.");
// Check configuration
static_assert((PLATFORM_THREADS_LIMIT & (PLATFORM_THREADS_LIMIT - 1)) == 0, "Threads limit must be power of two.");
static_assert(PLATFORM_THREADS_LIMIT % 4 == 0, "Threads limit must be multiple of 4.");
static_assert(PLATFORM_THREADS_LIMIT % 4 == 0 || PLATFORM_THREADS_LIMIT == 1, "Threads limit must be multiple of 4.");
const Char* PlatformBase::ApplicationClassName = TEXT("FlaxWindow");
float PlatformBase::CustomDpiScale = 1.0f;
@@ -301,6 +301,15 @@ bool PlatformBase::Is64BitApp()
#endif
}
bool PlatformBase::Is64BitPlatform()
{
#if PLATFORM_64BITS
return true;
#else
return false;
#endif
}
int32 PlatformBase::GetCacheLineSize()
{
return (int32)Platform::GetCPUInfo().CacheLineSize;
@@ -820,6 +829,8 @@ const Char* ToString(PlatformType type)
return TEXT("Mac");
case PlatformType::iOS:
return TEXT("iOS");
case PlatformType::Web:
return TEXT("Web");
default:
return TEXT("");
}