mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-04-15 21:15:48 -05:00
Fix compiling with debug logs
This commit is contained in:
parent
f0c6354fa6
commit
8c973db737
|
|
@ -607,7 +607,7 @@ namespace ShellCommands {
|
|||
const auto &hookList = plugin.getPluginLinkInformation().getHookDataList();
|
||||
OSReport("WUPS Hooks: %d\n", hookList.size());
|
||||
for (const auto &hook : hookList) {
|
||||
OSReport("\t- %p - %s\n", hook.getFunctionPointer(), hookNameToString(hook.getType()).c_str());
|
||||
OSReport("\t- %p - %s\n", hook.getFunctionPointer(), hookNameToString(hook.getType()));
|
||||
}
|
||||
OSReport("\n");
|
||||
const auto &buttonCombos = plugin.GetButtonComboData();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ void CallHook(const std::vector<PluginContainer> &plugins, const wups_loader_hoo
|
|||
}
|
||||
|
||||
void CallHook(const std::vector<PluginContainer> &plugins, const wups_loader_hook_type_t hook_type, const std::function<bool(const PluginContainer &)> &pred) {
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Calling hook of type %s [%d]", hookNameToString(hook.getType()).c_str(), hook_type);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Calling hook of type %s [%d]", hookNameToString(hook_type), hook_type);
|
||||
for (const auto &plugin : plugins) {
|
||||
if (pred(plugin)) {
|
||||
CallHook(plugin, hook_type);
|
||||
|
|
@ -36,7 +36,7 @@ void CallHook(const PluginContainer &plugin, const wups_loader_hook_type_t hook_
|
|||
}
|
||||
for (const auto &hook : plugin.getPluginLinkInformation().getHookDataList()) {
|
||||
if (hook.getType() == hook_type) {
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Calling hook of type %s for plugin %s [%d]", hookNameToString(hook.getType()).c_str(), plugin.getMetaInformation().getName().c_str(), hook_type);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Calling hook of type %s for plugin %s [%d]", hookNameToString(hook.getType()), plugin.getMetaInformation().getName().c_str(), hook_type);
|
||||
void *func_ptr = hook.getFunctionPointer();
|
||||
if (func_ptr != nullptr) {
|
||||
switch (hook_type) {
|
||||
|
|
@ -141,7 +141,7 @@ void CallHook(const PluginContainer &plugin, const wups_loader_hook_type_t hook_
|
|||
}
|
||||
default: {
|
||||
DEBUG_FUNCTION_LINE_ERR("######################################");
|
||||
DEBUG_FUNCTION_LINE_ERR("Hook is not implemented %s [%d]", hookNameToString(hook_type).c_str(), hook_type);
|
||||
DEBUG_FUNCTION_LINE_ERR("Hook is not implemented %s [%d]", hookNameToString(hook_type), hook_type);
|
||||
DEBUG_FUNCTION_LINE_ERR("######################################");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ void PrintCapturedStackTrace(const std::span<const uint32_t> trace) {
|
|||
DEBUG_FUNCTION_LINE_INFO("└────────────────────────────────────────────────────────────┘");
|
||||
}
|
||||
|
||||
std::string hookNameToString(const wups_loader_hook_type_t type) {
|
||||
const char *hookNameToString(const wups_loader_hook_type_t type) {
|
||||
switch (type) {
|
||||
case WUPS_LOADER_HOOK_INIT_WUT_MALLOC:
|
||||
return "WUPS_LOADER_HOOK_INIT_WUT_MALLOC";
|
||||
|
|
|
|||
|
|
@ -171,4 +171,4 @@ std::string getModuleAndSymbolName(uint32_t addr);
|
|||
|
||||
void PrintCapturedStackTrace(std::span<const uint32_t> trace);
|
||||
|
||||
std::string hookNameToString(wups_loader_hook_type_t type);
|
||||
const char *hookNameToString(wups_loader_hook_type_t type);
|
||||
Loading…
Reference in New Issue
Block a user