mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-29 23:01:58 +00:00
return null if sound is not found
svn-id: r16737
This commit is contained in:
parent
d261e3c9d3
commit
ac72fcd63d
@ -140,10 +140,11 @@ File *BundleMgr::getFile(const char *filename, int32 &offset, int32 &size) {
|
||||
_file.seek(_bundleTable[i].offset, SEEK_SET);
|
||||
offset = _bundleTable[i].offset;
|
||||
size = _bundleTable[i].size;
|
||||
break;
|
||||
return &_file;
|
||||
}
|
||||
}
|
||||
return &_file;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool BundleMgr::open(const char *filename, bool &compressed) {
|
||||
|
@ -366,6 +366,10 @@ ImuseDigiSndMgr::soundStruct *ImuseDigiSndMgr::openSound(int32 soundId, const ch
|
||||
int32 offset = 0, size = 0;
|
||||
sprintf(fileName, "%s.map", soundName);
|
||||
File *rmapFile = sound->bundle->getFile(fileName, offset, size);
|
||||
if (!rmapFile) {
|
||||
closeSound(sound);
|
||||
return NULL;
|
||||
}
|
||||
prepareSoundFromRMAP(rmapFile, sound, offset, size);
|
||||
strcpy(sound->name, soundName);
|
||||
sound->soundId = soundId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user