Minor fixes
This commit is contained in:
@@ -654,7 +654,9 @@ namespace FlaxEditor
|
|||||||
GameSettings.Save(new WindowsPlatformSettings());
|
GameSettings.Save(new WindowsPlatformSettings());
|
||||||
GameSettings.Save(new LinuxPlatformSettings());
|
GameSettings.Save(new LinuxPlatformSettings());
|
||||||
GameSettings.Save(new AndroidPlatformSettings());
|
GameSettings.Save(new AndroidPlatformSettings());
|
||||||
GameSettings.Save(new UWPPlatformSettings());
|
GameSettings.Save(new MacPlatformSettings());
|
||||||
|
GameSettings.Save(new iOSPlatformSettings());
|
||||||
|
GameSettings.Save(new WebPlatformSettings());
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void OnPlayBeginning()
|
internal void OnPlayBeginning()
|
||||||
|
|||||||
@@ -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)
|
// 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
|
// Let's hide these locks just for the saving
|
||||||
const auto locks = storage->_chunksLock;
|
const auto locks = Platform::AtomicRead(&storage->_chunksLock);
|
||||||
storage->_chunksLock = 0;
|
Platform::AtomicStore(&storage->_chunksLock, 0);
|
||||||
result = storage->Save(data, silentMode);
|
result = storage->Save(data, silentMode);
|
||||||
ASSERT(storage->_chunksLock == 0);
|
Platform::InterlockedAdd(&storage->_chunksLock, locks);
|
||||||
storage->_chunksLock = locks;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ASSERT(filePath.HasChars());
|
|
||||||
result = FlaxStorage::Create(filePath, data, silentMode);
|
result = FlaxStorage::Create(filePath, data, silentMode);
|
||||||
}
|
}
|
||||||
if (binaryAsset)
|
if (binaryAsset)
|
||||||
|
|||||||
@@ -744,7 +744,9 @@ bool TextureTool::ImportTextureDirectXTex(ImageType type, const StringView& path
|
|||||||
!options.InvertAlphaChannel &&
|
!options.InvertAlphaChannel &&
|
||||||
!options.InvertBlueChannel &&
|
!options.InvertBlueChannel &&
|
||||||
!options.ReconstructZChannel &&
|
!options.ReconstructZChannel &&
|
||||||
|
!options.sRGB &&
|
||||||
options.Compress &&
|
options.Compress &&
|
||||||
|
options.InternalFormat == PixelFormat::Unknown &&
|
||||||
type == ImageType::DDS &&
|
type == ImageType::DDS &&
|
||||||
mipLevels == sourceMipLevels &&
|
mipLevels == sourceMipLevels &&
|
||||||
DirectX::IsCompressed(sourceDxgiFormat) &&
|
DirectX::IsCompressed(sourceDxgiFormat) &&
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ bool TextureTool::UpdateTexture(GPUContext* context, GPUTexture* texture, int32
|
|||||||
auto tempSlicePitch = tempRowPitch * mipHeight;
|
auto tempSlicePitch = tempRowPitch * mipHeight;
|
||||||
tempData.Resize(tempSlicePitch * mipDepth);
|
tempData.Resize(tempSlicePitch * mipDepth);
|
||||||
|
|
||||||
ASSERT(data.Length() / rowPitch >= mipHeight);
|
ASSERT(data.Length() / rowPitch >= (uint32)mipHeight);
|
||||||
for (int32 y = 0; y < mipHeight; y++)
|
for (int32 y = 0; y < mipHeight; y++)
|
||||||
{
|
{
|
||||||
for (int32 x = 0; x < mipWidth; x++)
|
for (int32 x = 0; x < mipWidth; x++)
|
||||||
|
|||||||
Reference in New Issue
Block a user