Adopt to new chnages of WUMS

This commit is contained in:
Maschell 2020-06-03 18:21:43 +02:00
parent 62d93a065f
commit b2562f6275

View File

@ -19,21 +19,18 @@
WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend"); WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
int test();
std::vector<PluginContainer> loadPlugins(const std::vector<PluginData> &pluginList, MEMHeapHandle heapHandle); std::vector<PluginContainer> loadPlugins(const std::vector<PluginData> &pluginList, MEMHeapHandle heapHandle);
#define gModuleData ((module_information_t *) (0x00880000)) #define gModuleData ((module_information_t *) (0x00880000))
int main(int argc, char **argv) { WUMS_INITIALIZE(){
test();
} }
int test() { WUMS_APPLICATION_STARTS() {
WHBLogUdpInit(); WHBLogUdpInit();
uint32_t upid = OSGetUPID(); uint32_t upid = OSGetUPID();
if (upid != 2 && upid != 15) { if (upid != 2 && upid != 15) {
return 0; return;
} }
bool initNeeded = false; bool initNeeded = false;
if (pluginDataHeap == NULL) { if (pluginDataHeap == NULL) {
@ -63,7 +60,7 @@ int test() {
gPluginInformation = (plugin_information_t *) MEMAllocFromExpHeapEx(pluginDataHeap, sizeof(plugin_information_t), 4); gPluginInformation = (plugin_information_t *) MEMAllocFromExpHeapEx(pluginDataHeap, sizeof(plugin_information_t), 4);
if (gPluginInformation == NULL) { if (gPluginInformation == NULL) {
DEBUG_FUNCTION_LINE("Failed to allocate global plugin information"); DEBUG_FUNCTION_LINE("Failed to allocate global plugin information");
return 0; return;
} }
memset((void *) gPluginInformation, 0, sizeof(plugin_information_t)); memset((void *) gPluginInformation, 0, sizeof(plugin_information_t));
@ -156,5 +153,5 @@ int test() {
PluginManagement::PatchFunctionsAndCallHooks(gPluginInformation); PluginManagement::PatchFunctionsAndCallHooks(gPluginInformation);
} }
return 0; return;
} }