Include cleanup, fix compiling with latest wut,

This commit is contained in:
Maschell
2022-02-11 22:18:15 +01:00
parent 2547c7edca
commit 6df6d871aa
11 changed files with 24 additions and 23 deletions

View File

@@ -88,13 +88,17 @@ void CallHookEx(plugin_information_t *pluginInformation, wups_loader_hook_type_t
hook_type == WUPS_LOADER_HOOK_CONFIG_CLOSED ||
hook_type == WUPS_LOADER_HOOK_RELEASE_FOREGROUND ||
hook_type == WUPS_LOADER_HOOK_ACQUIRED_FOREGROUND) {
((void (*)())((uint32_t *) func_ptr))();
// clang-format off
((void(*)())((uint32_t *) func_ptr))();
// clang-format on
} else if (hook_type == WUPS_LOADER_HOOK_INIT_STORAGE) {
wups_loader_init_storage_args_t args;
args.open_storage_ptr = &StorageUtils::OpenStorage;
args.close_storage_ptr = &StorageUtils::CloseStorage;
args.plugin_id = plugin_data->meta.storageId;
((void (*)(wups_loader_init_storage_args_t))((uint32_t *) func_ptr))(args);
// clang-format off
((void(*)(wups_loader_init_storage_args_t))((uint32_t *) func_ptr))(args);
// clang-format on
} else {
DEBUG_FUNCTION_LINE("######################################");
DEBUG_FUNCTION_LINE("Hook is not implemented %s [%d]", hook_names[hook_type], hook_type);