Formatting of hooks.cpp, improving logs when a hook is not implemented

This commit is contained in:
Maschell 2020-05-03 11:16:22 +02:00
parent 4f5de0f889
commit 7c0476fab4

View File

@ -2,7 +2,6 @@
#include "utils/logger.h"
void CallHook(plugin_information_t *pluginInformation, wups_loader_hook_type_t hook_type) {
CallHookEx(pluginInformation, hook_type, -1);
}
@ -75,7 +74,8 @@ void CallHookEx(plugin_information_t * pluginInformation, wups_loader_hook_type_
((void (*)(void)) ((uint32_t *) func_ptr))();
} else if (hook_type == WUPS_LOADER_HOOK_APPLICATION_END) {
((void (*)(void)) ((uint32_t *) func_ptr))();
} if(hook_type == WUPS_LOADER_HOOK_INIT_WUT_MALLOC) {
}
if (hook_type == WUPS_LOADER_HOOK_INIT_WUT_MALLOC) {
((void (*)(void)) ((uint32_t *) func_ptr))();
} else if (hook_type == WUPS_LOADER_HOOK_FINI_WUT_MALLOC) {
((void (*)(void)) ((uint32_t *) func_ptr))();
@ -92,7 +92,7 @@ void CallHookEx(plugin_information_t * pluginInformation, wups_loader_hook_type_
} else if (hook_type == WUPS_LOADER_HOOK_FINI_WUT_STDCPP) {
((void (*)(void)) ((uint32_t *) func_ptr))();
} else {
DEBUG_FUNCTION_LINE("IMPLEMENT ME");
DEBUG_FUNCTION_LINE("Hook is not implemented %s", hook_names[hook_data->type]);
}
} else {
DEBUG_FUNCTION_LINE("Failed to call hook. It was not defined\n");