Fix calling convention
This commit is contained in:
parent
947165067c
commit
743d5aa015
|
@ -10,9 +10,13 @@
|
||||||
static uintptr_t g_gh_translationOffset{};
|
static uintptr_t g_gh_translationOffset{};
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#define HOOK(addr, name) void name(void *);
|
#define cdecl
|
||||||
|
#define stdcall __stdcall
|
||||||
|
#define HOOK(addr, name, call_conv) void call_conv name(void *);
|
||||||
#include "hooks.def"
|
#include "hooks.def"
|
||||||
#undef HOOK
|
#undef HOOK
|
||||||
|
#undef stdcall
|
||||||
|
#undef cdecl
|
||||||
}
|
}
|
||||||
|
|
||||||
struct R3Bin {
|
struct R3Bin {
|
||||||
|
@ -175,7 +179,7 @@ struct R3Bin {
|
||||||
"Failed to patch function {} at {} (RVA: {})", name, resolved, at));
|
"Failed to patch function {} at {} (RVA: {})", name, resolved, at));
|
||||||
}
|
}
|
||||||
void patchFunctions() {
|
void patchFunctions() {
|
||||||
#define HOOK(addr, name) patchFunction((void*)addr, &name, #name);
|
#define HOOK(addr, name, call_conv) patchFunction((void*)addr, &name, #name);
|
||||||
#include "hooks.def"
|
#include "hooks.def"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue