Merge pull request #545 from Areloch/AssetFileCaseSensitivityFix

Enforces filename string case sensitivity for assets' internal filenames
This commit is contained in:
Brian Roberts 2021-08-23 19:22:22 -05:00 committed by GitHub
commit 0a150e342f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 109 additions and 102 deletions

View file

@ -298,21 +298,15 @@ void ImageAsset::loadImage()
void ImageAsset::initializeAsset()
{
if (mImageFileName == StringTable->insert("z.png"))
{
Con::printf("Loaded z");
}
ResourceManager::get().getChangedSignal().notify(this, &ImageAsset::_onResourceChanged);
mImagePath = expandAssetFilePath(mImageFileName);
mImagePath = getOwned() ? expandAssetFilePath(mImageFileName) : mImagePath;
loadImage();
}
void ImageAsset::onAssetRefresh()
{
mImagePath = expandAssetFilePath(mImageFileName);
mImagePath = getOwned() ? expandAssetFilePath(mImageFileName) : mImagePath;
loadImage();
}
@ -323,7 +317,7 @@ void ImageAsset::_onResourceChanged(const Torque::Path& path)
refreshAsset();
loadImage();
//loadImage();
}
void ImageAsset::setImageFileName(const char* pScriptFile)
@ -332,7 +326,10 @@ void ImageAsset::setImageFileName(const char* pScriptFile)
AssertFatal(pScriptFile != NULL, "Cannot use a NULL image file.");
// Update.
mImageFileName = StringTable->insert(pScriptFile);
mImageFileName = StringTable->insert(pScriptFile, true);
// Refresh the asset.
refreshAsset();
}
const GBitmap& ImageAsset::getImage()