mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 14:09:06 +00:00
More linux file name case issues...
This commit is contained in:
parent
8f2279e28a
commit
5b7757530f
1 changed files with 12 additions and 23 deletions
|
@ -925,15 +925,13 @@ bool SoundManager::playVoice(const std::string &name, SoundVoiceType svt, float
|
|||
|
||||
if (!voicePath2.empty())
|
||||
{
|
||||
fn = voicePath2 + name + fileType;
|
||||
stringToLower(fn);
|
||||
fn = core->adjustFilenameCase(voicePath2 + name + fileType);
|
||||
if (exists(fn)) checkOther = false;
|
||||
}
|
||||
|
||||
if (checkOther)
|
||||
{
|
||||
fn = voicePath + name + fileType;
|
||||
stringToLower(fn);
|
||||
fn = core->adjustFilenameCase(voicePath + name + fileType);
|
||||
if (!exists(fn))
|
||||
{
|
||||
debugLog("Could not find voice file [" + fn + "]");
|
||||
|
@ -1281,27 +1279,25 @@ bool SoundManager::playMusic(const std::string &name, SoundLoopType slt, SoundFa
|
|||
if (!name.empty() && name[0] == '.')
|
||||
{
|
||||
fn = name;
|
||||
stringToLower(fn);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!audioPath2.empty())
|
||||
{
|
||||
fn = audioPath2 + name + fileType;
|
||||
stringToLower(fn);
|
||||
if (!exists(fn))
|
||||
{
|
||||
fn = musicPath + name + fileType;
|
||||
stringToLower(fn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fn = musicPath + name + fileType;
|
||||
stringToLower(fn);
|
||||
}
|
||||
}
|
||||
|
||||
fn = core->adjustFilenameCase(fn);
|
||||
|
||||
lastMusic = name;
|
||||
stringToLower(lastMusic);
|
||||
|
||||
|
@ -1498,14 +1494,8 @@ void loadCacheSoundsCallback (const std::string &filename, intptr_t param)
|
|||
}
|
||||
if (fileType==".ogg")
|
||||
{
|
||||
|
||||
std::string f = filename;
|
||||
stringToLower(f);
|
||||
|
||||
debugLog("trying to load sound " + f);
|
||||
|
||||
sm->loadSoundIntoBank(f, "", "");
|
||||
|
||||
debugLog("trying to load sound " + filename);
|
||||
sm->loadSoundIntoBank(filename, "", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1528,18 +1518,15 @@ Buffer SoundManager::loadSoundIntoBank(const std::string &filename, const std::s
|
|||
debugLog(filename);
|
||||
if (slt == SFXLOAD_LOCAL && !audioPath2.empty())
|
||||
{
|
||||
f = audioPath2 + filename + format;
|
||||
stringToLower(f);
|
||||
f = core->adjustFilenameCase(audioPath2 + filename + format);
|
||||
if (!exists(f))
|
||||
{
|
||||
f = path + filename + format;
|
||||
stringToLower(f);
|
||||
f = core->adjustFilenameCase(path + filename + format);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
f = path + filename + format;
|
||||
stringToLower(f);
|
||||
f = core->adjustFilenameCase(path + filename + format);
|
||||
}
|
||||
|
||||
bool loop = false;
|
||||
|
@ -1561,6 +1548,8 @@ Buffer SoundManager::loadSoundIntoBank(const std::string &filename, const std::s
|
|||
return Buffer();
|
||||
}
|
||||
|
||||
stringToLower(name);
|
||||
|
||||
#ifdef BBGE_BUILD_FMODEX
|
||||
|
||||
FMOD::Sound * sound = SoundCore::soundMap[name];
|
||||
|
|
Loading…
Reference in a new issue