WUPS 0.7.0 support

This commit is contained in:
Maschell 2022-01-23 21:16:38 +01:00
parent 79eb5758b7
commit b49f561430
4 changed files with 11 additions and 8 deletions

View File

@ -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 ||

View File

@ -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);
@ -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);
}

View File

@ -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;
}

View File

@ -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)