mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2025-02-16 20:09:12 +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 "plugin/PluginContainerPersistence.h"
|
||||||
#include "PluginManagement.h"
|
#include "PluginManagement.h"
|
||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
|
#include "hooks.h"
|
||||||
|
|
||||||
WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
|
WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
|
||||||
|
|
||||||
std::vector<PluginContainer> loadPlugins(const std::vector<PluginData> &pluginList, MEMHeapHandle heapHandle);
|
std::vector<PluginContainer> loadPlugins(const std::vector<PluginData> &pluginList, MEMHeapHandle heapHandle);
|
||||||
|
|
||||||
WUMS_INITIALIZE(args) {
|
WUMS_INITIALIZE(args) {
|
||||||
__init_wut();
|
|
||||||
WHBLogUdpInit();
|
WHBLogUdpInit();
|
||||||
|
|
||||||
gModuleData = args.module_information;
|
gModuleData = args.module_information;
|
||||||
@ -26,11 +26,15 @@ WUMS_INITIALIZE(args) {
|
|||||||
OSFatal("WUPS-Backend: The module information struct version does not match.");
|
OSFatal("WUPS-Backend: The module information struct version does not match.");
|
||||||
}
|
}
|
||||||
WHBLogPrintf("Init successful");
|
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() {
|
WUMS_APPLICATION_STARTS() {
|
||||||
__init_wut();
|
|
||||||
WHBLogUdpInit();
|
WHBLogUdpInit();
|
||||||
uint32_t upid = OSGetUPID();
|
uint32_t upid = OSGetUPID();
|
||||||
if (upid != 2 && upid != 15) {
|
if (upid != 2 && upid != 15) {
|
||||||
|
@ -255,12 +255,7 @@ DECL_FUNCTION(uint32_t, OSReceiveMessage, OSMessageQueue *queue, OSMessage *mess
|
|||||||
if (message->args[0] == 0xFACEF000) {
|
if (message->args[0] == 0xFACEF000) {
|
||||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_ACQUIRED_FOREGROUND);
|
CallHook(gPluginInformation, WUPS_LOADER_HOOK_ACQUIRED_FOREGROUND);
|
||||||
} else if (message->args[0] == 0xD1E0D1E0) {
|
} else if (message->args[0] == 0xD1E0D1E0) {
|
||||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_END);
|
// Implemented via WUMS Hook
|
||||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB);
|
|
||||||
__fini_wut();
|
|
||||||
//gInBackground = false;
|
|
||||||
//DCFlushRange(&gInBackground,4);
|
|
||||||
//unmount_sd_fat("sd");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastData0 = message->args[0];
|
lastData0 = message->args[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user