Fix NQD_bitblt_hook() to perform sign check correctly

This commit is contained in:
gbeauche 2006-05-07 10:49:48 +00:00
parent bc13355b57
commit 75f3bdea68

View File

@ -378,9 +378,9 @@ bool NQD_bitblt_hook(uint32 p)
ReadMacInt32(p + 0x130) == 0 && ReadMacInt32(p + 0x130) == 0 &&
ReadMacInt32(p + acclSrcPixelSize) >= 8 && ReadMacInt32(p + acclSrcPixelSize) >= 8 &&
ReadMacInt32(p + acclSrcPixelSize) == ReadMacInt32(p + acclDestPixelSize) && ReadMacInt32(p + acclSrcPixelSize) == ReadMacInt32(p + acclDestPixelSize) &&
(ReadMacInt32(p + acclSrcRowBytes) ^ ReadMacInt32(p + acclDestRowBytes)) >= 0 && // same sign? (int32)(ReadMacInt32(p + acclSrcRowBytes) ^ ReadMacInt32(p + acclDestRowBytes)) >= 0 && // same sign?
ReadMacInt32(p + acclTransferMode) == 0 && // srcCopy? ReadMacInt32(p + acclTransferMode) == 0 && // srcCopy?
ReadMacInt32(p + 0x15c) > 0) { (int32)ReadMacInt32(p + 0x15c) > 0) {
// Yes, set function pointer // Yes, set function pointer
WriteMacInt32(p + acclDrawProc, NativeTVECT(NATIVE_BITBLT)); WriteMacInt32(p + acclDrawProc, NativeTVECT(NATIVE_BITBLT));