From 4f1142695e5ffcf99afd794f9b7c9d4c2712f95f Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 4 Oct 2026 18:44:02 +0200 Subject: [PATCH] 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 ba47566596d240b901aa69fe2514927ef0427b6e. --- saco/game/patches.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/saco/game/patches.cpp b/saco/game/patches.cpp index 8708264..644c653 100644 --- a/saco/game/patches.cpp +++ b/saco/game/patches.cpp @@ -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); } }