Minor fixes

This commit is contained in:
2026-04-07 11:08:03 +02:00
parent 0505135d7e
commit 1ec58e3563
4 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -654,7 +654,9 @@ namespace FlaxEditor
GameSettings.Save(new WindowsPlatformSettings());
GameSettings.Save(new LinuxPlatformSettings());
GameSettings.Save(new AndroidPlatformSettings());
GameSettings.Save(new UWPPlatformSettings());
GameSettings.Save(new MacPlatformSettings());
GameSettings.Save(new iOSPlatformSettings());
GameSettings.Save(new WebPlatformSettings());
}
internal void OnPlayBeginning()
+3 -5
View File
@@ -373,15 +373,13 @@ bool BinaryAsset::SaveToAsset(const StringView& path, AssetInitData& data, bool
{
// HACK: file is locked by some tasks (e.g material asset loaded some data and is updating the asset)
// Let's hide these locks just for the saving
const auto locks = storage->_chunksLock;
storage->_chunksLock = 0;
const auto locks = Platform::AtomicRead(&storage->_chunksLock);
Platform::AtomicStore(&storage->_chunksLock, 0);
result = storage->Save(data, silentMode);
ASSERT(storage->_chunksLock == 0);
storage->_chunksLock = locks;
Platform::InterlockedAdd(&storage->_chunksLock, locks);
}
else
{
ASSERT(filePath.HasChars());
result = FlaxStorage::Create(filePath, data, silentMode);
}
if (binaryAsset)
@@ -744,7 +744,9 @@ bool TextureTool::ImportTextureDirectXTex(ImageType type, const StringView& path
!options.InvertAlphaChannel &&
!options.InvertBlueChannel &&
!options.ReconstructZChannel &&
!options.sRGB &&
options.Compress &&
options.InternalFormat == PixelFormat::Unknown &&
type == ImageType::DDS &&
mipLevels == sourceMipLevels &&
DirectX::IsCompressed(sourceDxgiFormat) &&
@@ -427,7 +427,7 @@ bool TextureTool::UpdateTexture(GPUContext* context, GPUTexture* texture, int32
auto tempSlicePitch = tempRowPitch * mipHeight;
tempData.Resize(tempSlicePitch * mipDepth);
ASSERT(data.Length() / rowPitch >= mipHeight);
ASSERT(data.Length() / rowPitch >= (uint32)mipHeight);
for (int32 y = 0; y < mipHeight; y++)
{
for (int32 x = 0; x < mipWidth; x++)