mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-06 00:59:18 +00:00
Preserve original function names
This commit is contained in:
parent
b349100d9d
commit
eba44261c7
@ -4,7 +4,17 @@
|
||||
#include "PPUCallback.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
#include <map>
|
||||
// Helper function
|
||||
constexpr const char* ppu_select_name(const char* name, u32 id)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
// Helper function
|
||||
constexpr const char* ppu_select_name(const char* name, const char* orig_name)
|
||||
{
|
||||
return orig_name;
|
||||
}
|
||||
|
||||
// Generate FNID or VNID for given name
|
||||
extern u32 ppu_generate_id(const char* name);
|
||||
@ -226,11 +236,11 @@ inline RT ppu_execute_function_or_callback(const char* name, ppu_thread& ppu, Ar
|
||||
|
||||
#define CALL_FUNC(ppu, func, ...) ppu_execute_function_or_callback<decltype(&func), &func>(#func, ppu, __VA_ARGS__)
|
||||
|
||||
#define REG_FNID(module, nid, func) ppu_module_manager::register_static_function<decltype(&func), &func>(#module, #func, BIND_FUNC(func), ppu_generate_id(nid))
|
||||
#define REG_FNID(module, nid, func) ppu_module_manager::register_static_function<decltype(&func), &func>(#module, ppu_select_name(#func, nid), BIND_FUNC(func), ppu_generate_id(nid))
|
||||
|
||||
#define REG_FUNC(module, func) REG_FNID(module, #func, func)
|
||||
|
||||
#define REG_VNID(module, nid, var) ppu_module_manager::register_static_variable<decltype(var), &var>(#module, #var, ppu_generate_id(nid))
|
||||
#define REG_VNID(module, nid, var) ppu_module_manager::register_static_variable<decltype(var), &var>(#module, ppu_select_name(#var, nid), ppu_generate_id(nid))
|
||||
|
||||
#define REG_VAR(module, var) REG_VNID(module, #var, var)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user