mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-22 04:39:17 +01:00
Call ApplicationEnd-hooks inside WUMS_APPLICATIONS_ENDS, remove __init_wut()/__fini_wut() calls
This commit is contained in:
parent
96cfe71230
commit
75bbf9b457
@ -9,13 +9,13 @@
|
||||
#include "plugin/PluginContainerPersistence.h"
|
||||
#include "PluginManagement.h"
|
||||
#include "utils/logger.h"
|
||||
#include "hooks.h"
|
||||
|
||||
WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
|
||||
|
||||
std::vector<PluginContainer> loadPlugins(const std::vector<PluginData> &pluginList, MEMHeapHandle heapHandle);
|
||||
|
||||
WUMS_INITIALIZE(args) {
|
||||
__init_wut();
|
||||
WHBLogUdpInit();
|
||||
|
||||
gModuleData = args.module_information;
|
||||
@ -26,11 +26,15 @@ WUMS_INITIALIZE(args) {
|
||||
OSFatal("WUPS-Backend: The module information struct version does not match.");
|
||||
}
|
||||
WHBLogPrintf("Init successful");
|
||||
__fini_wut();
|
||||
}
|
||||
|
||||
WUMS_APPLICATION_ENDS() {
|
||||
DEBUG_FUNCTION_LINE("Call hooks");
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_END);
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB);
|
||||
}
|
||||
|
||||
WUMS_APPLICATION_STARTS() {
|
||||
__init_wut();
|
||||
WHBLogUdpInit();
|
||||
uint32_t upid = OSGetUPID();
|
||||
if (upid != 2 && upid != 15) {
|
||||
|
@ -255,12 +255,7 @@ DECL_FUNCTION(uint32_t, OSReceiveMessage, OSMessageQueue *queue, OSMessage *mess
|
||||
if (message->args[0] == 0xFACEF000) {
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_ACQUIRED_FOREGROUND);
|
||||
} else if (message->args[0] == 0xD1E0D1E0) {
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_END);
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB);
|
||||
__fini_wut();
|
||||
//gInBackground = false;
|
||||
//DCFlushRange(&gInBackground,4);
|
||||
//unmount_sd_fat("sd");
|
||||
// Implemented via WUMS Hook
|
||||
}
|
||||
}
|
||||
lastData0 = message->args[0];
|
||||
|
Loading…
Reference in New Issue
Block a user