From cfc364e4f126c78728edb253a389a0c3431dad17 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 7 Jul 2025 11:16:29 +0200 Subject: [PATCH] fix: Commands that setup init events not working anymore --- main/gui/source/init/run/cli.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main/gui/source/init/run/cli.cpp b/main/gui/source/init/run/cli.cpp index a5f39adaa..a5315c264 100644 --- a/main/gui/source/init/run/cli.cpp +++ b/main/gui/source/init/run/cli.cpp @@ -74,9 +74,11 @@ namespace hex::init { // Process the arguments hex::subcommands::processArguments(args); - // Unload plugins again - EventManager::clear(); - PluginManager::unload(); + // Explicitly don't unload plugins again here. + // Certain CLI commands configure things inside of plugins and then let ImHex start up normally + // If plugins were to be unloaded here, this setup would be reset. + // PluginManager::load() will be executed again later on, but it will not load any more plugins into the + // address space. But they will be properly initialized at that point. } } \ No newline at end of file