Revert "[saco] Correct SetIPLs to spell out the last two patches; retail inlines the protect/memcpy/restore there instead of calling _patch, only the two spare frame slots and one materialised address differ now"

This reverts commit ba47566596.
This commit is contained in:
RD42 committed 2026-10-04 18:44:02 +02:00
1 parent efee24a57d
commit 4f1142695e
1 file changed
+2 -11
+2 -11
View File
@@ -49,17 +49,8 @@ void SetIPLs(int iIPLs, int iGtaVersion)
patch(0x156495A,bIPLs);
patch(0x156115C,bIPLs);
}
// the last two are _patch spelled out, not a call to it
DWORD dwProtect[2];
VirtualProtect((PVOID)0x40619B,sizeof(bIPLs),PAGE_EXECUTE_READWRITE,&dwProtect[0]);
memcpy((PVOID)0x40619B,bIPLs,sizeof(bIPLs));
VirtualProtect((PVOID)0x40619B,sizeof(bIPLs),dwProtect[0],&dwProtect[1]);
VirtualProtect((PVOID)0x405C3D,sizeof(bIPLs),PAGE_EXECUTE_READWRITE,&dwProtect[0]);
memcpy((PVOID)0x405C3D,bIPLs,sizeof(bIPLs));
VirtualProtect((PVOID)0x405C3D,sizeof(bIPLs),dwProtect[0],&dwProtect[1]);
patch(0x40619B,bIPLs);
patch(0x405C3D,bIPLs);
}
}