diff --git a/toolbox/rm.cpp b/toolbox/rm.cpp index 18da9bb..b74237e 100644 --- a/toolbox/rm.cpp +++ b/toolbox/rm.cpp @@ -28,6 +28,8 @@ using namespace OS::Internal; namespace { + bool ResLoad = true; + #if 0 struct ResEntry { @@ -121,6 +123,10 @@ namespace RM if (!nativeHandle) return SetResError(resNotFound); + // in OS X 10.8, ::SetResLoad(false) seems to be permanent. + // therefore, explicitly load it if needed. (PascalIIgs) + if (ResLoad) ::LoadResource(nativeHandle); + size = ::GetHandleSize(nativeHandle); error = MM::Native::NewHandle(size, false, theHandle, ptr); @@ -323,6 +329,7 @@ namespace RM Log("%04x SetResLoad(%04x)\n", trap, load); + ResLoad = load; ::SetResLoad(load); memoryWriteByte(load ? 0xff : 0x00, MacOS::ResLoad); // word or byte?