mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
SCI: GetMessage: lock resource.
svn-id: r40390
This commit is contained in:
parent
e933c02fd2
commit
f4bcd1680f
@ -148,11 +148,16 @@ int MessageState::loadRes(int module) {
|
||||
if (_module == module)
|
||||
return 1;
|
||||
|
||||
// Unlock old resource
|
||||
if (_module != -1)
|
||||
resmgr->unlockResource(current_res, _module, kResourceTypeMessage);
|
||||
|
||||
_module = module;
|
||||
current_res = resmgr->findResource(kResourceTypeMessage, module, 0);
|
||||
current_res = resmgr->findResource(kResourceTypeMessage, module, 1);
|
||||
|
||||
if (current_res == NULL || current_res->data == NULL) {
|
||||
sciprintf("Message subsystem: Failed to load %d.MSG\n", module);
|
||||
_module = -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user