fix compilation of steamclient_extra on msys2
This commit is contained in:
parent
0f53c0481f
commit
02d3a70574
@ -348,10 +348,10 @@ filter { "action:vs*", }
|
|||||||
-- GNU make common compiler/linker options
|
-- GNU make common compiler/linker options
|
||||||
filter { "action:gmake*", }
|
filter { "action:gmake*", }
|
||||||
buildoptions {
|
buildoptions {
|
||||||
"-fvisibility=hidden", "-fexceptions", "-fno-jump-tables" , "-Wno-switch"
|
"-fvisibility=hidden", "-fexceptions", "-fno-jump-tables" , "-Wno-switch",
|
||||||
}
|
}
|
||||||
linkoptions {
|
linkoptions {
|
||||||
"-Wl,--exclude-libs,ALL"
|
"-Wl,--exclude-libs,ALL",
|
||||||
}
|
}
|
||||||
-- this is made separate because GCC complains but not CLANG
|
-- this is made separate because GCC complains but not CLANG
|
||||||
filter { "action:gmake*" , "files:*.cpp or *.cc or *.hpp", }
|
filter { "action:gmake*" , "files:*.cpp or *.cc or *.hpp", }
|
||||||
|
@ -129,7 +129,7 @@ static uint8_t *exe_addr_base = (uint8_t *)GetModuleHandleW(NULL);
|
|||||||
static uint8_t *bind_addr_base = nullptr;
|
static uint8_t *bind_addr_base = nullptr;
|
||||||
static uint8_t *bind_addr_end = nullptr;
|
static uint8_t *bind_addr_end = nullptr;
|
||||||
|
|
||||||
bool restore_win32_apis();
|
static bool restore_win32_apis();
|
||||||
|
|
||||||
// stub v2 needs manual change for .text, section must have write access
|
// stub v2 needs manual change for .text, section must have write access
|
||||||
static void change_mem_pages_access()
|
static void change_mem_pages_access()
|
||||||
@ -256,9 +256,9 @@ static bool redirect_win32_apis()
|
|||||||
if (DetourTransactionBegin() != NO_ERROR) return false;
|
if (DetourTransactionBegin() != NO_ERROR) return false;
|
||||||
if (DetourUpdateThread(GetCurrentThread()) != NO_ERROR) return false;
|
if (DetourUpdateThread(GetCurrentThread()) != NO_ERROR) return false;
|
||||||
|
|
||||||
if (DetourAttach((PVOID *)&actual_GetTickCount, GetTickCount_hook) != NO_ERROR) return false;
|
if (DetourAttach((PVOID *)&actual_GetTickCount, (PVOID)GetTickCount_hook) != NO_ERROR) return false;
|
||||||
if (DetourAttach((PVOID *)&actual_GetModuleHandleA, GetModuleHandleA_hook) != NO_ERROR) return false;
|
if (DetourAttach((PVOID *)&actual_GetModuleHandleA, (PVOID)GetModuleHandleA_hook) != NO_ERROR) return false;
|
||||||
if (DetourAttach((PVOID *)&actual_GetModuleHandleExA, GetModuleHandleExA_hook) != NO_ERROR) return false;
|
if (DetourAttach((PVOID *)&actual_GetModuleHandleExA, (PVOID)GetModuleHandleExA_hook) != NO_ERROR) return false;
|
||||||
bool ret = DetourTransactionCommit() == NO_ERROR;
|
bool ret = DetourTransactionCommit() == NO_ERROR;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
GetTickCount_hooked = true;
|
GetTickCount_hooked = true;
|
||||||
@ -277,9 +277,9 @@ static bool restore_win32_apis()
|
|||||||
if (DetourTransactionBegin() != NO_ERROR) return false;
|
if (DetourTransactionBegin() != NO_ERROR) return false;
|
||||||
if (DetourUpdateThread(GetCurrentThread()) != NO_ERROR) return false;
|
if (DetourUpdateThread(GetCurrentThread()) != NO_ERROR) return false;
|
||||||
|
|
||||||
DetourDetach((PVOID *)&actual_GetTickCount, GetTickCount_hook);
|
DetourDetach((PVOID *)&actual_GetTickCount, (PVOID)GetTickCount_hook);
|
||||||
DetourDetach((PVOID *)&actual_GetModuleHandleA, GetModuleHandleA_hook);
|
DetourDetach((PVOID *)&actual_GetModuleHandleA, (PVOID)GetModuleHandleA_hook);
|
||||||
DetourDetach((PVOID *)&actual_GetModuleHandleExA, GetModuleHandleExA_hook);
|
DetourDetach((PVOID *)&actual_GetModuleHandleExA, (PVOID)GetModuleHandleExA_hook);
|
||||||
return DetourTransactionCommit() == NO_ERROR;
|
return DetourTransactionCommit() == NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user