mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-22 04:39:17 +01:00
Include cleanup, fix compiling with latest wut,
This commit is contained in:
parent
2547c7edca
commit
6df6d871aa
@ -1,4 +1,4 @@
|
||||
FROM wiiuenv/devkitppc:20211229
|
||||
FROM wiiuenv/devkitppc:20220211
|
||||
|
||||
COPY --from=wiiuenv/wiiumodulesystem:20220127 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/wiiupluginsystem:20220123 /artifacts $DEVKITPRO
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <wums/defines/relocation_defines.h>
|
||||
|
||||
#include <function_patcher/function_patching.h>
|
||||
#include <wups.h>
|
||||
#include <wups/hooks.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -7,9 +7,9 @@ plugin_information_on_reload_t gLinkOnReload __attribute__((section(".data")));
|
||||
module_information_t *gModuleData __attribute__((section(".data"))) = nullptr;
|
||||
relocation_trampoline_entry_t *gTrampolineData __attribute__((section(".data"))) = nullptr;
|
||||
|
||||
uint32_t gPluginDataHeapSize = 0;
|
||||
uint32_t gPluginInformationHeapSize = 0;
|
||||
uint32_t gTrampolineDataSize = 0;
|
||||
uint32_t gPluginDataHeapSize __attribute__((section(".data"))) = 0;
|
||||
uint32_t gPluginInformationHeapSize __attribute__((section(".data"))) = 0;
|
||||
uint32_t gTrampolineDataSize __attribute__((section(".data"))) = 0;
|
||||
|
||||
StoredBuffer storedTVBuffer{};
|
||||
StoredBuffer storedDRCBuffer{};
|
||||
StoredBuffer storedTVBuffer __attribute__((section(".data"))) = {};
|
||||
StoredBuffer storedDRCBuffer __attribute__((section(".data"))) = {};
|
||||
|
@ -88,13 +88,17 @@ void CallHookEx(plugin_information_t *pluginInformation, wups_loader_hook_type_t
|
||||
hook_type == WUPS_LOADER_HOOK_CONFIG_CLOSED ||
|
||||
hook_type == WUPS_LOADER_HOOK_RELEASE_FOREGROUND ||
|
||||
hook_type == WUPS_LOADER_HOOK_ACQUIRED_FOREGROUND) {
|
||||
((void (*)())((uint32_t *) func_ptr))();
|
||||
// clang-format off
|
||||
((void(*)())((uint32_t *) func_ptr))();
|
||||
// clang-format on
|
||||
} else if (hook_type == WUPS_LOADER_HOOK_INIT_STORAGE) {
|
||||
wups_loader_init_storage_args_t args;
|
||||
args.open_storage_ptr = &StorageUtils::OpenStorage;
|
||||
args.close_storage_ptr = &StorageUtils::CloseStorage;
|
||||
args.plugin_id = plugin_data->meta.storageId;
|
||||
((void (*)(wups_loader_init_storage_args_t))((uint32_t *) func_ptr))(args);
|
||||
// clang-format off
|
||||
((void(*)(wups_loader_init_storage_args_t))((uint32_t *) func_ptr))(args);
|
||||
// clang-format on
|
||||
} else {
|
||||
DEBUG_FUNCTION_LINE("######################################");
|
||||
DEBUG_FUNCTION_LINE("Hook is not implemented %s [%d]", hook_names[hook_type], hook_type);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/plugin_defines.h"
|
||||
#include <wups.h>
|
||||
#include <wups/hooks.h>
|
||||
|
||||
void CallHook(plugin_information_t *pluginInformation, wups_loader_hook_type_t hook_type);
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <coreinit/messagequeue.h>
|
||||
#include <padscore/wpad.h>
|
||||
#include <vpad/input.h>
|
||||
#include <wups.h>
|
||||
|
||||
#include "../globals.h"
|
||||
#include "../hooks.h"
|
||||
@ -102,9 +101,9 @@ DECL_FUNCTION(void, WPADRead, WPADChan chan, WPADStatusProController *data) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define KiReport ((void (*)(const char *, ...)) 0xfff0ad0c)
|
||||
|
||||
// clang-format off
|
||||
#define KiReport ((void(*)(const char *, ...)) 0xfff0ad0c)
|
||||
// clang-format on
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize("O0")
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include <function_patcher/fpatching_defines.h>
|
||||
#include <string>
|
||||
#include <wups.h>
|
||||
|
||||
class FunctionData {
|
||||
|
||||
|
@ -18,8 +18,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <wups.h>
|
||||
|
||||
#include <wups/hooks.h>
|
||||
class HookData {
|
||||
|
||||
public:
|
||||
|
@ -18,14 +18,12 @@
|
||||
#include "PluginInformationFactory.h"
|
||||
#include "../utils/ElfUtils.h"
|
||||
#include "../utils/utils.h"
|
||||
#include "PluginData.h"
|
||||
#include <coreinit/cache.h>
|
||||
#include <coreinit/memexpheap.h>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <wups.h>
|
||||
#include <wups/function_patching.h>
|
||||
|
||||
using namespace ELFIO;
|
||||
|
||||
|
@ -167,7 +167,7 @@ void ConfigUtils::displayMenu() {
|
||||
VPADStatus vpad_data{};
|
||||
VPADReadError vpad_error;
|
||||
KPADStatus kpad_data{};
|
||||
int32_t kpad_error;
|
||||
KPADError kpad_error;
|
||||
|
||||
while (true) {
|
||||
buttonsTriggered = 0;
|
||||
@ -565,7 +565,9 @@ void ConfigUtils::displayMenu() {
|
||||
if (hook_data->func_pointer == nullptr) {
|
||||
break;
|
||||
}
|
||||
((void (*)())((uint32_t *) hook_data->func_pointer))();
|
||||
// clang-format off
|
||||
((void(*)())((uint32_t *) hook_data->func_pointer))();
|
||||
// clang-format on
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <wups.h>
|
||||
#include <wups/storage.h>
|
||||
|
||||
class StorageUtils {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user