Organize imports and format code

This commit is contained in:
Maschell 2020-05-28 20:51:31 +02:00
parent 80a0712519
commit 7a7a1f7a63
12 changed files with 23 additions and 35 deletions

View File

@ -9,7 +9,6 @@
#include "PluginManagement.h"
#include "hooks.h"
bool PluginManagement::doRelocation(const std::vector<RelocationData> &relocData, relocation_trampolin_entry_t *tramp_data, uint32_t tramp_length, uint32_t trampolinID) {
std::map<std::string, OSDynLoad_Module> moduleHandleCache;
for (auto const &cur : relocData) {

View File

@ -48,6 +48,7 @@ static const char **hook_names = (const char *[]) {
"WUPS_LOADER_HOOK_APPLET_START"};
void CallHookEx(plugin_information_t *pluginInformation, wups_loader_hook_type_t hook_type, int32_t plugin_index_needed) {
DEBUG_FUNCTION_LINE("Calling hook of type %s [%d]", hook_names[hook_type], hook_type);
for (int32_t plugin_index = 0; plugin_index < pluginInformation->number_used_plugins; plugin_index++) {
plugin_information_single_t *plugin_data = &pluginInformation->plugin_data[plugin_index];
if (plugin_index_needed != -1 && plugin_index_needed != plugin_index) {

View File

@ -1,28 +1,15 @@
#include <wups.h>
#include <whb/log.h>
#include <whb/log_udp.h>
#include <exception>
#include <sysapp/launch.h>
#include <coreinit/debug.h>
#include <coreinit/memexpheap.h>
#include <coreinit/dynload.h>
#include <coreinit/cache.h>
#include "plugin/PluginDataFactory.h"
#include "plugin/PluginContainerPersistence.h"
#include "plugin/PluginInformationFactory.h"
#include "plugin/PluginMetaInformationFactory.h"
#include "plugin/FunctionData.h"
#include "plugin/PluginContainer.h"
#include "utils/logger.h"
#include "utils/utils.h"
#include "kernel/kernel_utils.h"
#include "utils/ElfUtils.h"
#include "common/relocation_defines.h"
#include "common/plugin_defines.h"
#include "common/plugin_defines.h"
#include "common/module_defines.h"
#include "hooks.h"
#include "PluginManagement.h"
#include "globals.h"
#include <whb/sdcard.h>

View File

@ -36,6 +36,7 @@ std::optional<PluginMetaInformation> PluginMetaInformationFactory::loadPlugin(co
}
return loadPlugin(readerOpt.value());
}
std::optional<PluginMetaInformation> PluginMetaInformationFactory::loadPlugin(const std::string filePath) {
auto reader = new elfio;
if (reader == NULL || !reader->load(filePath)) {