Increase the maximum number of relocations from 500 to 1000. Refactor some code to a "PluginManagement" class.

This commit is contained in:
Maschell
2020-05-03 10:21:05 +02:00
parent 89445b77c2
commit 6d8fd08f25
7 changed files with 157 additions and 110 deletions

20
source/PluginManagement.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include <common/plugin_defines.h>
#include <vector>
class PluginManagement {
public:
static void Init(std::vector<PluginContainer> pInformation);
static void doRelocations(std::vector<PluginContainer> plugins, relocation_trampolin_entry_t *trampData, uint32_t tramp_size);
static void memsetBSS(std::vector<PluginContainer> plugins);
static void callInitHooks(plugin_information_t *pluginInformation);
static void PatchFunctionsAndCallHooks(plugin_information_t* gPluginInformation);
static bool doRelocation(const std::vector<RelocationData> &relocData, relocation_trampolin_entry_t *tramp_data, uint32_t tramp_length, uint32_t trampolinID);
};