Fix native mode, a better solution would be to also add GetResource()

patches into the native_op[] table in native mode too.
This commit is contained in:
gbeauche 2004-01-15 23:28:59 +00:00
parent 09cd7ccfd6
commit c0874f60e8

View File

@ -128,6 +128,7 @@ bool ThunksInit(void)
#else #else
#error "FIXME: define NativeOp for your platform" #error "FIXME: define NativeOp for your platform"
#endif #endif
// FIXME: add GetResource() and friends for completeness
DEFINE_NATIVE_OP(NATIVE_PATCH_NAME_REGISTRY, DoPatchNameRegistry); DEFINE_NATIVE_OP(NATIVE_PATCH_NAME_REGISTRY, DoPatchNameRegistry);
DEFINE_NATIVE_OP(NATIVE_VIDEO_INSTALL_ACCEL, VideoInstallAccel); DEFINE_NATIVE_OP(NATIVE_VIDEO_INSTALL_ACCEL, VideoInstallAccel);
DEFINE_NATIVE_OP(NATIVE_VIDEO_VBL, VideoVBL); DEFINE_NATIVE_OP(NATIVE_VIDEO_VBL, VideoVBL);
@ -150,9 +151,12 @@ bool ThunksInit(void)
#undef DEFINE_NATIVE_OP #undef DEFINE_NATIVE_OP
#endif #endif
// Initialize routine descriptors // Initialize routine descriptors (if TVECT exists)
for (int i = 0; i < NATIVE_OP_MAX; i++) for (int i = 0; i < NATIVE_OP_MAX; i++) {
native_op[i].desc = new SheepRoutineDescriptor(0, NativeTVECT(i)); uint32 tvect = native_op[i].tvect;
if (tvect)
native_op[i].desc = new SheepRoutineDescriptor(0, tvect);
}
return true; return true;
} }