Fix ResLoad not actually loading

This commit is contained in:
Kelvin Sherlock 2013-06-30 13:12:27 -04:00
parent a40bf9ee39
commit ce66961c7e

View File

@ -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?