mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-09-09 12:29:15 -05:00
Rename PluginInformation to PluginLinkInformation and make it optional in PluginContainer
This commit is contained in:
@@ -77,6 +77,9 @@ void ConfigUtils::displayMenu() {
|
||||
|
||||
std::vector<ConfigDisplayItem> configs;
|
||||
for (const auto &plugin : gLoadedPlugins) {
|
||||
if (!plugin.isPluginLinkedAndLoaded()) {
|
||||
continue;
|
||||
}
|
||||
GeneralConfigInformation info;
|
||||
info.name = plugin.getMetaInformation().getName();
|
||||
info.author = plugin.getMetaInformation().getAuthor();
|
||||
@@ -99,7 +102,7 @@ void ConfigUtils::displayMenu() {
|
||||
DEBUG_FUNCTION_LINE_ERR("Failed to create config for plugin: \"%s\"", info.name.c_str());
|
||||
}
|
||||
} else {
|
||||
for (const auto &hook : plugin.getPluginInformation().getHookDataList()) {
|
||||
for (const auto &hook : plugin.getPluginLinkInformation()->getHookDataList()) {
|
||||
if (hook.getType() == WUPS_LOADER_HOOK_GET_CONFIG_DEPRECATED) {
|
||||
if (hook.getFunctionPointer() == nullptr) {
|
||||
DEBUG_FUNCTION_LINE_ERR("Hook had invalid ptr");
|
||||
|
||||
@@ -276,9 +276,9 @@ extern "C" PluginBackendApiErrorType WUPSGetSectionInformationForPlugin(const wu
|
||||
if (handle != 0 && plugin_section_list != nullptr && buffer_size != 0) {
|
||||
bool found = false;
|
||||
for (const auto &curContainer : gLoadedPlugins) {
|
||||
if (curContainer.getHandle() == handle) {
|
||||
if (curContainer.isPluginLinkedAndLoaded() && curContainer.getHandle() == handle) {
|
||||
found = true;
|
||||
const auto §ionInfoList = curContainer.getPluginInformation().getSectionInfoList();
|
||||
const auto §ionInfoList = curContainer.getPluginLinkInformation()->getSectionInfoList();
|
||||
|
||||
uint32_t offset = 0;
|
||||
for (auto const §ionInfo : sectionInfoList | std::views::values) {
|
||||
@@ -320,9 +320,9 @@ extern "C" PluginBackendApiErrorType WUPSGetSectionMemoryAddresses(const wups_ba
|
||||
return PLUGIN_BACKEND_API_ERROR_INVALID_ARG;
|
||||
}
|
||||
for (const auto &curContainer : gLoadedPlugins) {
|
||||
if (curContainer.getHandle() == handle) {
|
||||
*textAddress = const_cast<void *>(curContainer.getPluginInformation().getTextMemory().data());
|
||||
*dataAddress = const_cast<void *>(curContainer.getPluginInformation().getDataMemory().data());
|
||||
if (curContainer.isPluginLinkedAndLoaded() && curContainer.getHandle() == handle) {
|
||||
*textAddress = const_cast<void *>(curContainer.getPluginLinkInformation()->getTextMemory().data());
|
||||
*dataAddress = const_cast<void *>(curContainer.getPluginLinkInformation()->getDataMemory().data());
|
||||
return PLUGIN_BACKEND_API_ERROR_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user