mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-12-23 03:21:48 +01:00
WUPS 0.7.0 support
This commit is contained in:
parent
79eb5758b7
commit
b49f561430
@ -32,6 +32,9 @@ static const char **hook_names = (const char *[]) {
|
||||
"WUPS_LOADER_HOOK_INIT_WUT_SOCKETS",
|
||||
"WUPS_LOADER_HOOK_FINI_WUT_SOCKETS",
|
||||
|
||||
"WUPS_LOADER_HOOK_INIT_WRAPPER",
|
||||
"WUPS_LOADER_HOOK_FINI_WRAPPER",
|
||||
|
||||
"WUPS_LOADER_HOOK_GET_CONFIG",
|
||||
"WUPS_LOADER_HOOK_CONFIG_CLOSED",
|
||||
|
||||
@ -79,6 +82,8 @@ void CallHookEx(plugin_information_t *pluginInformation, wups_loader_hook_type_t
|
||||
hook_type == WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB ||
|
||||
hook_type == WUPS_LOADER_HOOK_INIT_WUT_SOCKETS ||
|
||||
hook_type == WUPS_LOADER_HOOK_FINI_WUT_SOCKETS ||
|
||||
hook_type == WUPS_LOADER_HOOK_INIT_WRAPPER ||
|
||||
hook_type == WUPS_LOADER_HOOK_FINI_WRAPPER ||
|
||||
hook_type == WUPS_LOADER_HOOK_GET_CONFIG ||
|
||||
hook_type == WUPS_LOADER_HOOK_CONFIG_CLOSED ||
|
||||
hook_type == WUPS_LOADER_HOOK_RELEASE_FOREGROUND ||
|
||||
|
@ -42,6 +42,7 @@ WUMS_APPLICATION_REQUESTS_EXIT() {
|
||||
|
||||
WUMS_APPLICATION_ENDS() {
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_APPLICATION_ENDS);
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WRAPPER);
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_SOCKETS);
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_DEVOPTAB);
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_FINI_WUT_STDCPP);
|
||||
@ -191,7 +192,7 @@ WUMS_APPLICATION_STARTS() {
|
||||
}
|
||||
|
||||
if (gPluginDataHeap != nullptr) {
|
||||
auto plugins = PluginContainerPersistence::loadPlugins(gPluginInformation);
|
||||
auto plugins = PluginContainerPersistence::loadPlugins(gPluginInformation);
|
||||
PluginManagement::doRelocations(plugins, gTrampolineData, DYN_LINK_TRAMPOLIN_LIST_LENGTH);
|
||||
// PluginManagement::memsetBSS(plugins);
|
||||
|
||||
@ -206,6 +207,8 @@ WUMS_APPLICATION_STARTS() {
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_INIT_WUT_DEVOPTAB);
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_INIT_WUT_SOCKETS);
|
||||
|
||||
CallHook(gPluginInformation, WUPS_LOADER_HOOK_INIT_WRAPPER);
|
||||
|
||||
if (initNeeded) {
|
||||
PluginManagement::callInitHooks(gPluginInformation);
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ std::optional<std::shared_ptr<PluginMetaInformation>> PluginMetaInformationFacto
|
||||
} else if (key == "storage_id") {
|
||||
pluginInfo->setStorageId(value);
|
||||
} else if (key == "wups") {
|
||||
if (value != "0.6.1") {
|
||||
if (value != "0.7.0") {
|
||||
DEBUG_FUNCTION_LINE("Warning: Ignoring plugin - Unsupported WUPS version: %s.", value.c_str());
|
||||
return std::nullopt;
|
||||
}
|
||||
|
@ -9,13 +9,8 @@ extern "C" {
|
||||
#define __FILENAME_X__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
|
||||
|
||||
#define OSFATAL_FUNCTION_LINE(FMT, ARGS...)do { \
|
||||
OSFatal_printf("[%s]%s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
} while (0)
|
||||
#define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) while(0)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) do { \
|
||||
WHBLogPrintf("[%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
} while (0)
|
||||
#define DEBUG_FUNCTION_LINE(FMT, ARGS...)do { \
|
||||
WHBLogPrintf("[%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user