Use the name of a function instead of the function pointer inside the macro.

This commit is contained in:
Maschell 2020-06-13 14:45:18 +02:00
parent 3ae37e80e9
commit 1de6f6894a

View File

@ -123,13 +123,13 @@ typedef struct function_replacement_data_t {
REPLACE_FUNCTION_FOR_PROCESS(x, lib, function_name, FP_TARGET_PROCESS_GAME_AND_MENU) REPLACE_FUNCTION_FOR_PROCESS(x, lib, function_name, FP_TARGET_PROCESS_GAME_AND_MENU)
#define REPLACE_FUNCTION_FOR_PROCESS(x, lib, function_name, process) \ #define REPLACE_FUNCTION_FOR_PROCESS(x, lib, function_name, process) \
REPLACE_FUNCTION_EX(x, lib, function_name, 0, 0, process) REPLACE_FUNCTION_EX(x, lib, # function_name, 0, 0, process)
#define REPLACE_FUNCTION_VIA_ADDRESS(x, physicalAddress, effectiveAddress) \ #define REPLACE_FUNCTION_VIA_ADDRESS(x, physicalAddress, effectiveAddress) \
REPLACE_FUNCTION_VIA_ADDRESS_FOR_PROCESS(x, physicalAddress, effectiveAddress, FP_TARGET_PROCESS_ALL) REPLACE_FUNCTION_VIA_ADDRESS_FOR_PROCESS(x, physicalAddress, effectiveAddress, FP_TARGET_PROCESS_ALL)
#define REPLACE_FUNCTION_VIA_ADDRESS_FOR_PROCESS(x, physicalAddress, effectiveAddress, process) \ #define REPLACE_FUNCTION_VIA_ADDRESS_FOR_PROCESS(x, physicalAddress, effectiveAddress, process) \
REPLACE_FUNCTION_EX(x, LIBRARY_OTHER, x, physicalAddress, effectiveAddress, process) REPLACE_FUNCTION_EX(x, LIBRARY_OTHER, # x, physicalAddress, effectiveAddress, process)
#define REPLACE_FUNCTION_EX(x, lib, function_name, physicalAddress, effectiveAddress, process) \ #define REPLACE_FUNCTION_EX(x, lib, function_name, physicalAddress, effectiveAddress, process) \
{ \ { \