Add various fixes

This commit is contained in:
Wojtek Figat
2026-02-16 16:11:00 +01:00
parent d1557e5292
commit 6bd13feba6
6 changed files with 11 additions and 11 deletions

View File

@@ -286,13 +286,13 @@ FlaxStorage::LockData FlaxStorage::LockSafe()
uint32 FlaxStorage::GetRefCount() const
{
return (uint32)Platform::AtomicRead((int64*)&_refCount);
return (uint32)Platform::AtomicRead((intptr*)&_refCount);
}
bool FlaxStorage::ShouldDispose() const
{
return Platform::AtomicRead((int64*)&_refCount) == 0 &&
Platform::AtomicRead((int64*)&_chunksLock) == 0 &&
return Platform::AtomicRead((intptr*)&_refCount) == 0 &&
Platform::AtomicRead((intptr*)&_chunksLock) == 0 &&
Platform::GetTimeSeconds() - _lastRefLostTime >= 0.5; // TTL in seconds
}

View File

@@ -87,10 +87,10 @@ public:
protected:
// State
int64 _refCount = 0;
int64 _chunksLock = 0;
int64 _files = 0;
int64 _isUnloadingData = 0;
intptr _refCount = 0;
intptr _chunksLock = 0;
intptr _files = 0;
intptr _isUnloadingData = 0;
double _lastRefLostTime;
CriticalSection _loadLocker;

View File

@@ -112,7 +112,7 @@
#define DEPRECATED(...) _DEPRECATED(, ##__VA_ARGS__, _DEPRECATED_1(__VA_ARGS__), _DEPRECATED_0())
#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND)
#define HAS_EXCEPTIONS
#define HAS_EXCEPTIONS 1
#endif
// C++ 17

View File

@@ -74,7 +74,7 @@ struct TIsPODType<SkeletonBone>
class FLAXENGINE_API SkeletonData
{
private:
mutable volatile int64 _dirty = 1;
mutable volatile intptr _dirty = 1;
mutable Array<Matrix> _cachedPose;
public:

View File

@@ -41,7 +41,7 @@ PACK_STRUCT(struct SpriteParticleVertex
class SpriteParticleRenderer
{
public:
volatile int64 Ready = 0;
volatile intptr Ready = 0;
GPUBuffer* VB = nullptr;
GPUBuffer* IB = nullptr;
const static int32 VertexCount = 4;

View File

@@ -29,7 +29,7 @@ namespace Flax.Build.Platforms
public override string ExecutableFileExtension => ".html";
/// <inheritdoc />
public override string SharedLibraryFileExtension => ".so";
public override string SharedLibraryFileExtension => ".wasm";
/// <inheritdoc />
public override string StaticLibraryFileExtension => ".a";