mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Merge pull request #545 from Areloch/AssetFileCaseSensitivityFix
Enforces filename string case sensitivity for assets' internal filenames
This commit is contained in:
commit
0a150e342f
18 changed files with 109 additions and 102 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue