Enforces filename string case sensitivity for assets' internal filenames, which avoids the stringtable messing with the case preventing file name case sensitivity issues.

This commit is contained in:
Areloch 2021-08-21 23:12:37 -05:00
parent c04f3ae166
commit cfe122f714
18 changed files with 109 additions and 102 deletions

View file

@ -184,8 +184,7 @@ void SoundAsset::initializeAsset(void)
//ResourceManager::get().getChangedSignal.notify(this, &SoundAsset::_onResourceChanged);
//Ensure our path is expando'd if it isn't already
if (!Platform::isFullPath(mSoundPath))
mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath;
mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath;
mSoundPath = expandAssetFilePath(mSoundPath);
@ -208,8 +207,7 @@ void SoundAsset::onAssetRefresh(void)
return;
//Update
if (!Platform::isFullPath(mSoundFile))
mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath;
mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath;
loadSound();
}
@ -243,14 +241,14 @@ void SoundAsset::setSoundFile(const char* pSoundFile)
AssertFatal(pSoundFile != NULL, "Cannot use a NULL sound file.");
// Fetch sound file.
pSoundFile = StringTable->insert(pSoundFile);
pSoundFile = StringTable->insert(pSoundFile, true);
// Ignore no change,
if (pSoundFile == mSoundFile)
return;
// Update.
mSoundFile = pSoundFile;
mSoundFile = getOwned() ? expandAssetFilePath(pSoundFile) : pSoundFile;
// Refresh the asset.
refreshAsset();