diff --git a/lib/external/pattern_language b/lib/external/pattern_language index 78cdc3e7f..7fd9967ee 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit 78cdc3e7fd67ec7c95a186ee97215ff29a0316ce +Subproject commit 7fd9967ee74250876a272819c3a70e39200bc68d diff --git a/lib/libimhex/include/hex/plugin.hpp b/lib/libimhex/include/hex/plugin.hpp index 076729d58..cfefe704d 100644 --- a/lib/libimhex/include/hex/plugin.hpp +++ b/lib/libimhex/include/hex/plugin.hpp @@ -29,11 +29,6 @@ #define IMHEX_LIBRARY_SETUP_IMPL(name) \ namespace { static struct EXIT_HANDLER { ~EXIT_HANDLER() { hex::log::info("Unloaded library '{}'", name); } } HANDLER; } \ IMHEX_PLUGIN_VISIBILITY_PREFIX void initializeLibrary(); \ - static auto WOLV_TOKEN_CONCAT(libraryInitializer_, IMHEX_PLUGIN_NAME) = [] { \ - initializeLibrary(); \ - hex::log::info("Library plugin '{}' initialized successfully", WOLV_STRINGIFY(IMHEX_PLUGIN_NAME)); \ - return 0; \ - }(); \ IMHEX_PLUGIN_VISIBILITY_PREFIX void setImGuiContext(ImGuiContext *ctx) { \ ImGui::SetCurrentContext(ctx); \ GImGui = ctx; \ diff --git a/lib/libimhex/source/api/plugin_manager.cpp b/lib/libimhex/source/api/plugin_manager.cpp index 4107c118b..7d925b4ab 100644 --- a/lib/libimhex/source/api/plugin_manager.cpp +++ b/lib/libimhex/source/api/plugin_manager.cpp @@ -92,10 +92,10 @@ namespace hex { const auto pluginName = wolv::util::toUTF8String(m_path.filename()); if (this->isLibraryPlugin()) { - m_initialized = true; - return true; + m_functions.initializeLibraryFunction(); } + const auto requestedVersion = getCompatibleVersion(); if (requestedVersion != ImHexApi::System::getImHexVersion()) { if (requestedVersion.empty()) { diff --git a/lib/libimhex/source/api/task_manager.cpp b/lib/libimhex/source/api/task_manager.cpp index 9317a990f..d78369c5f 100644 --- a/lib/libimhex/source/api/task_manager.cpp +++ b/lib/libimhex/source/api/task_manager.cpp @@ -390,10 +390,10 @@ namespace hex { return ""; #elif defined(OS_MACOS) || defined(OS_LINUX) - std::array name; + std::array name = { }; pthread_getname_np(pthread_self(), name.data(), name.size()); - return name; + return name.data(); #elif defined(OS_WEB) return ""; #else