From b2562f6275fef94ab9cd8f05fbe6bf3b34f47535 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 3 Jun 2020 18:21:43 +0200 Subject: [PATCH] Adopt to new chnages of WUMS --- source/main.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index a7ca8d1..67609b6 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -19,21 +19,18 @@ WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend"); -int test(); - std::vector loadPlugins(const std::vector &pluginList, MEMHeapHandle heapHandle); #define gModuleData ((module_information_t *) (0x00880000)) -int main(int argc, char **argv) { - test(); +WUMS_INITIALIZE(){ } -int test() { +WUMS_APPLICATION_STARTS() { WHBLogUdpInit(); uint32_t upid = OSGetUPID(); if (upid != 2 && upid != 15) { - return 0; + return; } bool initNeeded = false; if (pluginDataHeap == NULL) { @@ -63,7 +60,7 @@ int test() { gPluginInformation = (plugin_information_t *) MEMAllocFromExpHeapEx(pluginDataHeap, sizeof(plugin_information_t), 4); if (gPluginInformation == NULL) { DEBUG_FUNCTION_LINE("Failed to allocate global plugin information"); - return 0; + return; } memset((void *) gPluginInformation, 0, sizeof(plugin_information_t)); @@ -156,5 +153,5 @@ int test() { PluginManagement::PatchFunctionsAndCallHooks(gPluginInformation); } - return 0; + return; }