From 8a4fa58cd42b7cca4a86fe2d9913b839b554bf10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Mon, 11 May 2020 05:55:57 +0300 Subject: Linux build support --- src/core/patcher.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/core/patcher.cpp') diff --git a/src/core/patcher.cpp b/src/core/patcher.cpp index e5242e9d..83e06886 100644 --- a/src/core/patcher.cpp +++ b/src/core/patcher.cpp @@ -24,7 +24,7 @@ StaticPatcher::Apply() } ms_head = nil; } - +#ifdef _WIN32 std::vector usedAddresses; static DWORD protect[2]; @@ -75,4 +75,20 @@ InjectHook_internal(uint32 address, uint32 hook, int type) VirtualProtect((void*)(address + 1), 4, protect[0], &protect[1]); else VirtualProtect((void*)address, 5, protect[0], &protect[1]); -} \ No newline at end of file +} +#else +void +Protect_internal(uint32 address, uint32 size) +{ +} + +void +Unprotect_internal(void) +{ +} + +void +InjectHook_internal(uint32 address, uint32 hook, int type) +{ +} +#endif -- cgit v1.2.3