mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-25 14:16:53 +01:00
Add missing __init_wut and __fini_wut calls
This commit is contained in:
parent
c8f372a77a
commit
0467178650
@ -6,3 +6,5 @@
|
|||||||
extern plugin_information_t *gPluginInformation;
|
extern plugin_information_t *gPluginInformation;
|
||||||
extern MEMHeapHandle pluginDataHeap;
|
extern MEMHeapHandle pluginDataHeap;
|
||||||
extern plugin_information_on_reload_t gLinkOnReload;
|
extern plugin_information_on_reload_t gLinkOnReload;
|
||||||
|
extern "C" void __init_wut();
|
||||||
|
extern "C" void __fini_wut();
|
@ -22,6 +22,8 @@ std::vector<PluginContainer> loadPlugins(const std::vector<PluginData> &pluginLi
|
|||||||
|
|
||||||
module_information_t *gModuleData = NULL;
|
module_information_t *gModuleData = NULL;
|
||||||
WUMS_INITIALIZE(args) {
|
WUMS_INITIALIZE(args) {
|
||||||
|
__init_wut();
|
||||||
|
WHBLogUdpInit();
|
||||||
gModuleData = args.module_information;
|
gModuleData = args.module_information;
|
||||||
if(gModuleData == NULL){
|
if(gModuleData == NULL){
|
||||||
OSFatal("WUPS-Backend: Failed to get gModuleData pointer.");
|
OSFatal("WUPS-Backend: Failed to get gModuleData pointer.");
|
||||||
@ -29,9 +31,12 @@ WUMS_INITIALIZE(args) {
|
|||||||
if(gModuleData->version != MODULE_INFORMATION_VERSION){
|
if(gModuleData->version != MODULE_INFORMATION_VERSION){
|
||||||
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");
|
||||||
|
__fini_wut();
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
||||||
|
@ -258,6 +258,7 @@ DECL_FUNCTION(uint32_t, OSReceiveMessage, OSMessageQueue *queue, OSMessage *mess
|
|||||||
} else if (message->args[0] == 0xD1E0D1E0) {
|
} else if (message->args[0] == 0xD1E0D1E0) {
|
||||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_END);
|
CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_END);
|
||||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB);
|
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB);
|
||||||
|
__fini_wut();
|
||||||
//gInBackground = false;
|
//gInBackground = false;
|
||||||
//DCFlushRange(&gInBackground,4);
|
//DCFlushRange(&gInBackground,4);
|
||||||
//unmount_sd_fat("sd");
|
//unmount_sd_fat("sd");
|
||||||
|
Loading…
Reference in New Issue
Block a user