mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
If I understand cyx correctly, this is the proper fix for bug #1253171,
even though I thought it looked a bit hackish when I proposed it. svn-id: r18687
This commit is contained in:
parent
251e158e2b
commit
5cca832a85
@ -793,6 +793,16 @@ byte *ResourceManager::createResource(int type, int idx, uint32 size) {
|
||||
|
||||
if (!validateResource("allocating", type, idx))
|
||||
return NULL;
|
||||
|
||||
if (_vm->_version <= 2) {
|
||||
// Nuking and reloading a resource can be harmful in some
|
||||
// cases. For instance, Zak tries to reload the intro music
|
||||
// while it's playing. See bug #1253171.
|
||||
|
||||
if (address[type][idx] && (type == rtSound || type == rtScript || type == rtCostume))
|
||||
return address[type][idx] + sizeof(MemBlkHeader);
|
||||
}
|
||||
|
||||
nukeResource(type, idx);
|
||||
|
||||
expireResources(size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user