From c0874f60e8cb961497f3d49ab15dc939728665df Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Thu, 15 Jan 2004 23:28:59 +0000 Subject: [PATCH] Fix native mode, a better solution would be to also add GetResource() patches into the native_op[] table in native mode too. --- SheepShaver/src/thunks.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SheepShaver/src/thunks.cpp b/SheepShaver/src/thunks.cpp index fcdfdcbe..7c490e82 100644 --- a/SheepShaver/src/thunks.cpp +++ b/SheepShaver/src/thunks.cpp @@ -128,6 +128,7 @@ bool ThunksInit(void) #else #error "FIXME: define NativeOp for your platform" #endif + // FIXME: add GetResource() and friends for completeness DEFINE_NATIVE_OP(NATIVE_PATCH_NAME_REGISTRY, DoPatchNameRegistry); DEFINE_NATIVE_OP(NATIVE_VIDEO_INSTALL_ACCEL, VideoInstallAccel); DEFINE_NATIVE_OP(NATIVE_VIDEO_VBL, VideoVBL); @@ -150,9 +151,12 @@ bool ThunksInit(void) #undef DEFINE_NATIVE_OP #endif - // Initialize routine descriptors - for (int i = 0; i < NATIVE_OP_MAX; i++) - native_op[i].desc = new SheepRoutineDescriptor(0, NativeTVECT(i)); + // Initialize routine descriptors (if TVECT exists) + for (int i = 0; i < NATIVE_OP_MAX; i++) { + uint32 tvect = native_op[i].tvect; + if (tvect) + native_op[i].desc = new SheepRoutineDescriptor(0, tvect); + } return true; }